Преглед на файлове

共富区-第一次促销升级活动

sunxbiao преди 5 месеца
родител
ревизия
f4a0fa0df1

+ 52 - 0
app/common/dao/shared/SharedProsperityGroupUserDao.php

@@ -5,6 +5,7 @@ namespace app\common\dao\shared;
5 5
 use app\common\dao\BaseDao;
6 6
 use app\common\model\BaseModel;
7 7
 use app\common\model\shared\SharedProsperityGroupUser;
8
+use app\entity\data\shared\SharedProsperityGroupUserEntity;
8 9
 use think\db\exception\DbException;
9 10
 
10 11
 class SharedProsperityGroupUserDao extends BaseDao
@@ -57,4 +58,55 @@ class SharedProsperityGroupUserDao extends BaseDao
57 58
             return [];
58 59
         }
59 60
     }
61
+
62
+    /**
63
+     * @param array $idList
64
+     * @return SharedProsperityGroupUserEntity[]
65
+     */
66
+    public function getSharedProsperityGroupUserEntityListByIdList(array $idList): array
67
+    {
68
+        $entityList = [];
69
+        try {
70
+            /** @var SharedProsperityGroupUser $model */
71
+            $model = $this->getModel();
72
+            $dataRes = $model::getDB()
73
+                ->whereIn('id', $idList)
74
+                ->select()
75
+                ->toArray();
76
+            if (!empty($dataRes)) {
77
+                $entityList = array_map(function ($data) {
78
+                    return SharedProsperityGroupUserEntity::newInstance($data);
79
+                }, $dataRes);
80
+            }
81
+        } catch (\Exception $e) {
82
+
83
+        }
84
+        return $entityList;
85
+    }
86
+
87
+    /**
88
+     * @param array $userIdList
89
+     * @return SharedProsperityGroupUserEntity[]
90
+     */
91
+    public function getSharedProsperityGroupUserEntityListByUserIdList(array $userIdList): array
92
+    {
93
+        $entityList = [];
94
+        try {
95
+            /** @var SharedProsperityGroupUser $model */
96
+            $model = $this->getModel();
97
+            $dataRes = $model::getDB()
98
+                ->whereIn('user_id', $userIdList)
99
+                ->select()
100
+                ->toArray();
101
+            if (!empty($dataRes)) {
102
+                $entityList = array_map(function ($data) {
103
+                    return SharedProsperityGroupUserEntity::newInstance($data);
104
+                }, $dataRes);
105
+            }
106
+        } catch (\Exception $e) {
107
+
108
+        }
109
+        return $entityList;
110
+    }
111
+
60 112
 }

+ 121 - 0
app/common/repositories/shared/SharedProsperityGroupUserRepository.php

@@ -0,0 +1,121 @@
1
+<?php
2
+
3
+namespace app\common\repositories\shared;
4
+
5
+use app\common\dao\shared\SharedProsperityGroupUserDao;
6
+use app\common\repositories\BaseRepository;
7
+use app\entity\data\shared\SharedProsperityGroupUserEntity;
8
+use think\db\exception\DbException;
9
+
10
+class SharedProsperityGroupUserRepository extends BaseRepository
11
+{
12
+
13
+    protected $dao;
14
+
15
+    /**
16
+     * SharedProsperityGroupUserRepository constructor.
17
+     * @param SharedProsperityGroupUserDao $dao
18
+     */
19
+    public function __construct(SharedProsperityGroupUserDao $dao)
20
+    {
21
+        $this->dao = $dao;
22
+    }
23
+
24
+    /**
25
+     * @param int $id
26
+     * @return SharedProsperityGroupUserEntity
27
+     */
28
+    public function getSharedProsperityGroupUserEntityById(int $id): SharedProsperityGroupUserEntity
29
+    {
30
+        $entityList = $this->getSharedProsperityGroupUserEntityListByIdList([$id]);
31
+        $entity = array_shift($entityList);
32
+        if ($entity instanceof SharedProsperityGroupUserEntity) {
33
+            return $entity;
34
+        } else {
35
+            /** @var SharedProsperityGroupUserEntity */
36
+            return SharedProsperityGroupUserEntity::newInstance();
37
+        }
38
+    }
39
+
40
+    /**
41
+     * @param array $idList
42
+     * @return SharedProsperityGroupUserEntity[]
43
+     */
44
+    public function getSharedProsperityGroupUserEntityListByIdList(array $idList): array
45
+    {
46
+        return $this->dao->getSharedProsperityGroupUserEntityListByIdList($idList);
47
+    }
48
+
49
+    /**
50
+     * @param int $userId
51
+     * @return SharedProsperityGroupUserEntity
52
+     */
53
+    public function getSharedProsperityGroupUserEntityByUserId(int $userId): SharedProsperityGroupUserEntity
54
+    {
55
+        $entityList = $this->getSharedProsperityGroupUserEntityListByIdList([$userId]);
56
+        $entity = array_shift($entityList);
57
+        if ($entity instanceof SharedProsperityGroupUserEntity) {
58
+            return $entity;
59
+        } else {
60
+            /** @var SharedProsperityGroupUserEntity */
61
+            return SharedProsperityGroupUserEntity::newInstance();
62
+        }
63
+    }
64
+
65
+    /**
66
+     * @param array $userIdList
67
+     * @return SharedProsperityGroupUserEntity[]
68
+     */
69
+    public function getSharedProsperityGroupUserEntityListByUserIdList(array $userIdList): array
70
+    {
71
+        return $this->dao->getSharedProsperityGroupUserEntityListByUserIdList($userIdList);
72
+    }
73
+
74
+    public function create($data)
75
+    {
76
+        return $this->dao->create($data);
77
+    }
78
+
79
+
80
+    /**
81
+     * @param SharedProsperityGroupUserEntity $SharedProsperityGroupUserEntity
82
+     * @return SharedProsperityGroupUserEntity
83
+     */
84
+    public function createByEntity(SharedProsperityGroupUserEntity $SharedProsperityGroupUserEntity): SharedProsperityGroupUserEntity
85
+    {
86
+        $result = $this->create($SharedProsperityGroupUserEntity->toUnderlineArray())->toArray();
87
+        /** @var SharedProsperityGroupUserEntity $entity */
88
+        $entity = SharedProsperityGroupUserEntity::newInstance($result);
89
+        return $entity;
90
+    }
91
+
92
+    /**
93
+     * @param $id
94
+     * @param $data
95
+     * @return int
96
+     */
97
+    public function update($id, $data): int
98
+    {
99
+        try {
100
+            return $this->dao->update($id, $data);
101
+        } catch (DbException $e) {
102
+            return 0;
103
+        }
104
+    }
105
+
106
+    /**
107
+     * @param SharedProsperityGroupUserEntity $SharedProsperityGroupUserEntity
108
+     * @return SharedProsperityGroupUserEntity
109
+     */
110
+    public function updateByEntity(SharedProsperityGroupUserEntity $SharedProsperityGroupUserEntity): SharedProsperityGroupUserEntity
111
+    {
112
+        if (empty($SharedProsperityGroupUserEntity->getId())) {
113
+            return SharedProsperityGroupUserEntity::newInstance();
114
+        }
115
+        $result = $this->update($SharedProsperityGroupUserEntity->getId(), $SharedProsperityGroupUserEntity->toUnderlineArray());
116
+        if ($result > 0) {
117
+            return $this->getSharedProsperityGroupUserEntityById($SharedProsperityGroupUserEntity->getId());
118
+        }
119
+        return SharedProsperityGroupUserEntity::newInstance();
120
+    }
121
+}

+ 120 - 36
app/common/repositories/shared/SharedProsperityUserRepository.php

@@ -10,6 +10,7 @@ use app\common\enum\shared\SharedProsperityRewardRecordEnum;
10 10
 use app\common\enum\shared\SharedProsperityUserEnum;
11 11
 use app\common\repositories\BaseRepository;
12 12
 use app\common\repositories\store\order\StoreOrderRepository;
13
+use app\entity\data\shared\SharedProsperityGroupUserEntity;
13 14
 use app\entity\data\shared\SharedProsperityRecommendConfigEntity;
14 15
 use app\entity\data\shared\SharedProsperityUserEntity;
15 16
 use think\db\exception\DbException;
@@ -225,9 +226,9 @@ class SharedProsperityUserRepository extends BaseRepository
225 226
         $maxPv = 0;
226 227
         $maxPvIndex = -1;
227 228
         foreach ($list as $index => &$item) {
228
-            $teamUserIds = $this->dao->getAllSubordinateUserIds($item['user_id'],false,4);
229
+            $teamUserIds = $this->dao->getAllSubordinateUserIds($item['user_id'], false, 4);
229 230
             $teamTotalCount = count($teamUserIds);
230
-            $teamPvSum = $this->dao->getTeamPvSum($item['user_id'],4);
231
+            $teamPvSum = $this->dao->getTeamPvSum($item['user_id'], 4);
231 232
             $item['team_total_count'] = $teamTotalCount;
232 233
             $item['team_pv_sum'] = $teamPvSum;
233 234
             // 补充用户信息
@@ -364,7 +365,52 @@ class SharedProsperityUserRepository extends BaseRepository
364 365
             //     );
365 366
             // }
366 367
 
368
+
369
+            // 暂时新增加逻辑 用户购买 298 商品后,自动升级为1星合伙人,目前只有消费者 能够获得PV值,在奖励结算时,判断订单金额 是否大于 298 并且 用户身份为 用户,则升级为一星合伙人
370
+            // 逻辑修改,如果用户的身份 是普通用户,则统计他在共富区内 所有消费的金额,是否超 每天自增的 升级限制金额,如果超过则升级为1星合伙人
371
+            if ($sharedProsperityUserEntity->getPartnerLevel() == 0) {
372
+                /** @var StoreOrderRepository $storeOrderRepository */
373
+                $storeOrderRepository = app()->make(StoreOrderRepository::class);
374
+                $sumTotalPrice = $storeOrderRepository->getSumTotalPriceByUidAndMerId($sharedProsperityUserEntity->getUserId(), CommonEnum::DESIGN_MERCHANT_ID['SharedProsperity']['code']);
375
+                if (!empty($sumTotalPrice)) {
376
+                    $partnerLevel = $sharedProsperityUserEntity->getPartnerLevel();
377
+                    /** @var SharedProsperityRecommendConfigRepository $sharedProsperityRecommendConfigRepository */
378
+                    $sharedProsperityRecommendConfigRepository = app()->make(SharedProsperityRecommendConfigRepository::class);
379
+                    $sharedProsperityRecommendConfigEntityList = $sharedProsperityRecommendConfigRepository->getList();
380
+                    usort($sharedProsperityRecommendConfigEntityList, function (SharedProsperityRecommendConfigEntity $a, SharedProsperityRecommendConfigEntity $b) {
381
+                        return $a->getLevel() <=> $b->getLevel();  // 从小到大排序
382
+                    });
383
+                    foreach ($sharedProsperityRecommendConfigEntityList as $sharedProsperityRecommendConfigEntity) {
384
+                        if (is_null($sharedProsperityRecommendConfigEntity->getConsume())) {
385
+                            continue;
386
+                        }
387
+                        if ($sumTotalPrice >= $sharedProsperityRecommendConfigEntity->getConsume() && $sharedProsperityUserEntity->getPartnerLevel() < $sharedProsperityRecommendConfigEntity->getLevel()) {
388
+                            // 修改用户的等级
389
+                            $sharedProsperityUserEntity->setPartnerLevel($sharedProsperityRecommendConfigEntity->getLevel());
390
+                        }
391
+                    }
392
+                    // 也就是说 升级了 保存到数据库
393
+                    if ($partnerLevel != $sharedProsperityUserEntity->getPartnerLevel()) {
394
+                        $this->updateByEntity(
395
+                            SharedProsperityUserEntity::newInstance()
396
+                                ->setId($sharedProsperityUserEntity->getId())
397
+                                ->setPartnerLevel($sharedProsperityUserEntity->getPartnerLevel())
398
+                        );
399
+                    }
400
+                }
401
+            }
402
+
403
+            // 根据原来的团队升级规则,去升级推荐人等级
367 404
             $this->upgradeUpperLevels($sharedProsperityUserEntity->getUserId(), $sharedProsperityRecommendConfigEntityList);
405
+
406
+            // 新的升级规则
407
+            // 如果当前用户升级了 那要看一下他的上级 是否也需要升级
408
+            if (!empty($sharedProsperityUserEntity->getParentId())) {
409
+                $sharedProsperityUserEntityByParent = $this->getSharedProsperityUserEntityByUserId($sharedProsperityUserEntity->getParentId());
410
+                if (!empty($sharedProsperityUserEntityByParent->getId()) && $sharedProsperityUserEntityByParent->getPartnerLevel() < 2) {
411
+                    $this->upgradeUpperLevelsByPromotionOne($sharedProsperityUserEntityByParent);
412
+                }
413
+            }
368 414
         }
369 415
     }
370 416
 
@@ -422,30 +468,6 @@ class SharedProsperityUserRepository extends BaseRepository
422 468
         // 计算新等级
423 469
         $newLevel = $this->calculateLevelByTeamPv($teamPvBySmallSum, $sharedProsperityRecommendConfigEntityList);
424 470
 
425
-        // 暂时新增加逻辑 用户购买 298 商品后,自动升级为1星合伙人,目前只有消费者 能够获得PV值,在奖励结算时,判断订单金额 是否大于 298 并且 用户身份为 用户,则升级为一星合伙人
426
-        // 逻辑修改,如果用户的身份 是普通用户,则统计他在共富区内 所有消费的金额,是否超 每天自增的 升级限制金额,如果超过则升级为1星合伙人
427
-        if ($sharedProsperityUserEntity->getPartnerLevel() == 0) {
428
-            /** @var StoreOrderRepository $storeOrderRepository */
429
-            $storeOrderRepository = app()->make(StoreOrderRepository::class);
430
-            $sumTotalPrice = $storeOrderRepository->getSumTotalPriceByUidAndMerId($sharedProsperityUserEntity->getUserId(), CommonEnum::DESIGN_MERCHANT_ID['SharedProsperity']['code']);
431
-            if (!empty($sumTotalPrice)) {
432
-                /** @var SharedProsperityRecommendConfigRepository $sharedProsperityRecommendConfigRepository */
433
-                $sharedProsperityRecommendConfigRepository = app()->make(SharedProsperityRecommendConfigRepository::class);
434
-                $sharedProsperityRecommendConfigEntityList = $sharedProsperityRecommendConfigRepository->getList();
435
-                usort($sharedProsperityRecommendConfigEntityList, function (SharedProsperityRecommendConfigEntity $a, SharedProsperityRecommendConfigEntity $b) {
436
-                    return $a->getLevel() <=> $b->getLevel();  // 从小到大排序
437
-                });
438
-                foreach ($sharedProsperityRecommendConfigEntityList as $sharedProsperityRecommendConfigEntity) {
439
-                    if (is_null($sharedProsperityRecommendConfigEntity->getConsume())) {
440
-                        continue;
441
-                    }
442
-                    if ($sumTotalPrice >= $sharedProsperityRecommendConfigEntity->getConsume() && $newLevel < $sharedProsperityRecommendConfigEntity->getLevel()) {
443
-                        $newLevel = $sharedProsperityRecommendConfigEntity->getLevel();
444
-                    }
445
-                }
446
-            }
447
-        }
448
-
449 471
         // 如果新等级大于当前等级,则更新
450 472
         if ($newLevel > $sharedProsperityUserEntity->getPartnerLevel()) {
451 473
             $this->updateByEntity(
@@ -557,13 +579,13 @@ class SharedProsperityUserRepository extends BaseRepository
557 579
     {
558 580
         /** @var SharedProsperityUserDao $shareUserDao */
559 581
         $shareUserDao = app()->make(SharedProsperityUserDao::class);
560
-        
582
+
561 583
         // 获取所有下级用户ID(包括自己)
562 584
         $subordinateIds = $shareUserDao->getAllSubordinateUserIds($userId, true);
563 585
         if (empty($subordinateIds)) {
564 586
             return [];
565 587
         }
566
-        
588
+
567 589
         // 获取这些共富用户的基本信息(包含parent_id)
568 590
         $sharedUsers = $shareUserDao->getSharedProsperityUserEntityListByUserIdList($subordinateIds);
569 591
 
@@ -592,9 +614,9 @@ class SharedProsperityUserRepository extends BaseRepository
592 614
         $idToName = [];
593 615
         foreach ($userInfos as $userInfo) {
594 616
             $sharedUserInfo = $shareUserDao->getSharedProsperityUserEntityListByUserIdList([$userInfo->getUid()]);
595
-            $idToName[$userInfo->getUid()] = $userInfo->getNickname()  . '(' . $userInfo->account .')(身份:' . $partnerLevel[$sharedUserInfo[0]->getPartnerLevel()] . ')' ?? ('用户' . $userInfo->getUid());
617
+            $idToName[$userInfo->getUid()] = $userInfo->getNickname() . '(' . $userInfo->account . ')(身份:' . $partnerLevel[$sharedUserInfo[0]->getPartnerLevel()] . ')' ?? ('用户' . $userInfo->getUid());
596 618
         }
597
-        
619
+
598 620
         // 构建节点数组
599 621
         $nodes = [];
600 622
         foreach ($sharedUsers as $sharedUser) {
@@ -604,7 +626,7 @@ class SharedProsperityUserRepository extends BaseRepository
604 626
                 'name' => $idToName[$sharedUser->getUserId()] ?? ('用户' . $sharedUser->getUserId()),
605 627
             ];
606 628
         }
607
-        
629
+
608 630
         // 构建树,以传入的用户为根节点
609 631
         $rootNode = $this->findNode($nodes, $userId);
610 632
         if (!$rootNode) {
@@ -617,7 +639,7 @@ class SharedProsperityUserRepository extends BaseRepository
617 639
         ];
618 640
         return [$tree];
619 641
     }
620
-    
642
+
621 643
     /**
622 644
      * 递归构建共富用户树
623 645
      * @param array $nodes 节点数组,每个节点包含 user_id, parent_id, name
@@ -639,7 +661,7 @@ class SharedProsperityUserRepository extends BaseRepository
639 661
         }
640 662
         return $branch;
641 663
     }
642
-    
664
+
643 665
     /**
644 666
      * 根据user_id查找节点名称
645 667
      * @param array $nodes
@@ -655,7 +677,7 @@ class SharedProsperityUserRepository extends BaseRepository
655 677
         }
656 678
         return null;
657 679
     }
658
-    
680
+
659 681
     /**
660 682
      * 根据user_id查找节点
661 683
      * @param array $nodes
@@ -685,7 +707,7 @@ class SharedProsperityUserRepository extends BaseRepository
685 707
             $userData = $userDao->accountLikeByUser($params['account']);
686 708
             $uids = [];
687 709
             if ($userData) {
688
-                $uids = array_column($userData,'uid');
710
+                $uids = array_column($userData, 'uid');
689 711
             }
690 712
 
691 713
             $where[] = ['a.user_id', 'in', $uids];
@@ -697,7 +719,7 @@ class SharedProsperityUserRepository extends BaseRepository
697 719
             $userData = $userDao->nicknameLikeByUser($params['nickname']);
698 720
             $uids = [];
699 721
             if ($userData) {
700
-                $uids = array_column($userData,'uid');
722
+                $uids = array_column($userData, 'uid');
701 723
             }
702 724
             $where[] = ['a.user_id', 'in', $uids];
703 725
         }
@@ -824,4 +846,66 @@ class SharedProsperityUserRepository extends BaseRepository
824 846
             return false;
825 847
         }
826 848
     }
849
+
850
+    /**
851
+     * 第一次促销的 身份 升级方法
852
+     * @param SharedProsperityUserEntity $sharedProsperityUserEntity
853
+     * @return void
854
+     */
855
+    public function upgradeUpperLevelsByPromotionOne(SharedProsperityUserEntity $sharedProsperityUserEntity)
856
+    {
857
+        // 判断当前用户 是否在共富区的消费值 > 298,如果不满足则不能升级
858
+        /** @var StoreOrderRepository $storeOrderRepository */
859
+        $storeOrderRepository = app()->make(StoreOrderRepository::class);
860
+        $sumTotalPrice = $storeOrderRepository->getSumTotalPriceByUidAndMerId($sharedProsperityUserEntity->getUserId(), CommonEnum::DESIGN_MERCHANT_ID['SharedProsperity']['code']);
861
+        if ($sumTotalPrice < 298) {
862
+            return;
863
+        }
864
+
865
+        // 查询当前用户的直属下级
866
+        $sharedProsperityUserEntityListByChild = $this->getSharedProsperityUserEntityListByParentId($sharedProsperityUserEntity->getUserId());
867
+        // 一星合伙人数量
868
+        $oneStarPartner = 0;
869
+        // 二星合伙人数量
870
+        $twoStarPartner = 0;
871
+        foreach ($sharedProsperityUserEntityListByChild as $sharedProsperityUserEntityByChild) {
872
+            if ($sharedProsperityUserEntityByChild->getPartnerLevel() >= 1) {
873
+                $oneStarPartner++;
874
+                if ($sharedProsperityUserEntityByChild->getPartnerLevel() >= 2) {
875
+                    $twoStarPartner++;
876
+                }
877
+            }
878
+        }
879
+
880
+        // 推荐 6 个 2星以上的合伙人 增加万人团身份
881
+        if ($twoStarPartner >= 6) {
882
+            /** @var SharedProsperityGroupUserRepository $sharedProsperityGroupUserRepository */
883
+            $sharedProsperityGroupUserRepository = app()->make(SharedProsperityGroupUserRepository::class);
884
+            $sharedProsperityGroupUserEntity = $sharedProsperityGroupUserRepository->getSharedProsperityGroupUserEntityByUserId($sharedProsperityUserEntity->getUserId());
885
+            if (empty($sharedProsperityGroupUserEntity->getId())) {
886
+                // 如果没有共富团身份 则增加共富团 万人团身份
887
+                $sharedProsperityGroupUserRepository->createByEntity(
888
+                    SharedProsperityGroupUserEntity::newInstance()
889
+                        ->setUserId($sharedProsperityUserEntity->getUserId())
890
+                        ->setGroupId(1)
891
+                        ->setStatus(1)
892
+                );
893
+            }
894
+        }
895
+        // 推荐 6 个 1星以上的合伙人 则升级为 2 星合伙人
896
+        if ($sharedProsperityUserEntity->getPartnerLevel() < 2 && $oneStarPartner >= 6) {
897
+            $this->updateByEntity(
898
+                SharedProsperityUserEntity::newInstance()
899
+                    ->setId($sharedProsperityUserEntity->getId())
900
+                    ->setPartnerLevel(2)
901
+            );
902
+            // 如果当前用户升级了 那要看一下他的上级 是否也需要升级
903
+            if (!empty($sharedProsperityUserEntity->getParentId())) {
904
+                $sharedProsperityUserEntityByParent = $this->getSharedProsperityUserEntityByUserId($sharedProsperityUserEntity->getParentId());
905
+                if (!empty($sharedProsperityUserEntityByParent->getId()) && $sharedProsperityUserEntityByParent->getPartnerLevel() < 2) {
906
+                    $this->upgradeUpperLevelsByPromotionOne($sharedProsperityUserEntityByParent);
907
+                }
908
+            }
909
+        }
910
+    }
827 911
 }

+ 123 - 0
app/entity/data/shared/SharedProsperityGroupUserEntity.php

@@ -0,0 +1,123 @@
1
+<?php
2
+
3
+namespace app\entity\data\shared;
4
+
5
+use app\entity\data\DataEntity;
6
+
7
+class SharedProsperityGroupUserEntity extends DataEntity
8
+{
9
+    public $id = null;          // 记录ID
10
+    public $groupId = null;     // 等级 1万人团 2千人团 3百人团
11
+    public $userId = null;      // 用户id
12
+    public $status = null;      // 状态 0失效 1有效
13
+    public $createTime = null;  // 创建时间
14
+    public $updateTime = null;  // 更新时间
15
+
16
+    /**
17
+     * @return mixed
18
+     */
19
+    public function getId()
20
+    {
21
+        return $this->id;
22
+    }
23
+
24
+    /**
25
+     * @param mixed $id
26
+     * @return SharedProsperityGroupUserEntity
27
+     */
28
+    public function setId($id): SharedProsperityGroupUserEntity
29
+    {
30
+        $this->id = $id;
31
+        return $this;
32
+    }
33
+
34
+    /**
35
+     * @return mixed
36
+     */
37
+    public function getGroupId()
38
+    {
39
+        return $this->groupId;
40
+    }
41
+
42
+    /**
43
+     * @param mixed $groupId
44
+     * @return SharedProsperityGroupUserEntity
45
+     */
46
+    public function setGroupId($groupId): SharedProsperityGroupUserEntity
47
+    {
48
+        $this->groupId = $groupId;
49
+        return $this;
50
+    }
51
+
52
+    /**
53
+     * @return mixed
54
+     */
55
+    public function getUserId()
56
+    {
57
+        return $this->userId;
58
+    }
59
+
60
+    /**
61
+     * @param mixed $userId
62
+     * @return SharedProsperityGroupUserEntity
63
+     */
64
+    public function setUserId($userId): SharedProsperityGroupUserEntity
65
+    {
66
+        $this->userId = $userId;
67
+        return $this;
68
+    }
69
+
70
+    /**
71
+     * @return mixed
72
+     */
73
+    public function getStatus()
74
+    {
75
+        return $this->status;
76
+    }
77
+
78
+    /**
79
+     * @param mixed $status
80
+     * @return SharedProsperityGroupUserEntity
81
+     */
82
+    public function setStatus($status): SharedProsperityGroupUserEntity
83
+    {
84
+        $this->status = $status;
85
+        return $this;
86
+    }
87
+
88
+    /**
89
+     * @return mixed
90
+     */
91
+    public function getCreateTime()
92
+    {
93
+        return $this->createTime;
94
+    }
95
+
96
+    /**
97
+     * @param mixed $createTime
98
+     * @return SharedProsperityGroupUserEntity
99
+     */
100
+    public function setCreateTime($createTime): SharedProsperityGroupUserEntity
101
+    {
102
+        $this->createTime = $createTime;
103
+        return $this;
104
+    }
105
+
106
+    /**
107
+     * @return mixed
108
+     */
109
+    public function getUpdateTime()
110
+    {
111
+        return $this->updateTime;
112
+    }
113
+
114
+    /**
115
+     * @param mixed $updateTime
116
+     * @return SharedProsperityGroupUserEntity
117
+     */
118
+    public function setUpdateTime($updateTime): SharedProsperityGroupUserEntity
119
+    {
120
+        $this->updateTime = $updateTime;
121
+        return $this;
122
+    }
123
+}