|
|
@@ -17,6 +17,7 @@ use app\common\model\user\User;
|
|
17
|
17
|
use app\common\model\user\UserCertification;
|
|
18
|
18
|
use app\common\repositories\merchant\order\OrderGzcRepository;
|
|
19
|
19
|
use app\common\repositories\merchant\order\OrderMerchantRepository;
|
|
|
20
|
+use app\common\repositories\shared\SharedProsperityUserRepository;
|
|
20
|
21
|
use app\common\repositories\store\order\StoreGroupOrderRepository;
|
|
21
|
22
|
use app\common\repositories\store\order\StoreOrderRepository;
|
|
22
|
23
|
use app\common\repositories\store\order\StoreOrderStatusRepository;
|
|
|
@@ -27,6 +28,7 @@ use app\common\repositories\wechat\RoutineQrcodeRepository;
|
|
27
|
28
|
use app\common\repositories\wechat\WechatUserRepository;
|
|
28
|
29
|
use app\controller\api\user\Volunteer;
|
|
29
|
30
|
use app\controller\api\util\Signature;
|
|
|
31
|
+use app\entity\data\shared\SharedProsperityUserEntity;
|
|
30
|
32
|
use app\models\routine\RoutineQrcode;
|
|
31
|
33
|
use app\traits\GongApiRequest;
|
|
32
|
34
|
use app\traits\GzcApiRequest;
|
|
|
@@ -541,6 +543,18 @@ class Auth extends BaseController
|
|
541
|
543
|
}
|
|
542
|
544
|
// Log::info($data);
|
|
543
|
545
|
$user = $repository->registr($data['phone'], $data['password'],'APP',"","",1,$data['spread']);
|
|
|
546
|
+
|
|
|
547
|
+ // 注意创建完用户后 需要立马创建 共富体系 用户数据
|
|
|
548
|
+ /** @var SharedProsperityUserRepository $sharedProsperityUserRepository */
|
|
|
549
|
+ $sharedProsperityUserRepository = app()->make(SharedProsperityUserRepository::class);
|
|
|
550
|
+ $sharedProsperityUserEntity = $sharedProsperityUserRepository->createByEntity(
|
|
|
551
|
+ SharedProsperityUserEntity::newInstance()
|
|
|
552
|
+ ->setUserId($user->uid)
|
|
|
553
|
+ );
|
|
|
554
|
+ if (!empty($data['spread']) && !empty($sharedProsperityUserEntity->getUserId())) {
|
|
|
555
|
+ $sharedProsperityUserRepository->bindParentId((int)$sharedProsperityUserEntity->getUserId(), (int)$data['spread']);
|
|
|
556
|
+ }
|
|
|
557
|
+
|
|
544
|
558
|
// $repository->registr($data['phone'], $data['password'],'APP',$data['spread']);
|
|
545
|
559
|
$repository->addagent($user);
|
|
546
|
560
|
$user = $repository->mainUser($user);
|