Browse Source

优化用户下单方法-进行中

sunxbiao 11 months ago
parent
commit
bf736ea545

+ 2 - 2
app/common/dao/user/UserAddressDao.php

@@ -15,7 +15,7 @@ use app\common\dao\BaseDao;
15 15
 use app\common\enum\CommonEnum;
16 16
 use app\common\model\user\UserAddress as model;
17 17
 use app\entity\CommonEntity;
18
-use app\entity\data\user\AddressEntity;
18
+use app\entity\data\user\UserAddressEntity;
19 19
 
20 20
 class UserAddressDao extends BaseDao
21 21
 {
@@ -67,6 +67,6 @@ class UserAddressDao extends BaseDao
67 67
         } catch (\Exception $e) {
68 68
 
69 69
         }
70
-        return AddressEntity::newInstance($addressData);
70
+        return UserAddressEntity::newInstance($addressData);
71 71
     }
72 72
 }

+ 1 - 1
app/common/dao/user/UserBillDao.php

@@ -249,7 +249,7 @@ class UserBillDao extends BaseDao
249 249
     public function saveAll($dataList): array
250 250
     {
251 251
         try {
252
-            return $this->getModel()->saveAll($dataList)->toArray();
252
+            return $this->getModel()::getInstance()->allowField(array_keys(reset($dataList)))->saveAll($dataList)->toArray();
253 253
         } catch (\Exception $e) {
254 254
             return [];
255 255
         }

+ 1 - 1
app/common/dao/user/UserDao.php

@@ -441,7 +441,7 @@ class UserDao extends BaseDao
441 441
     public function saveAll($dataList): array
442 442
     {
443 443
         try {
444
-            return $this->getModel()->saveAll($dataList)->toArray();
444
+            return $this->getModel()::getInstance()->allowField(array_keys(reset($dataList)))->saveAll($dataList)->toArray();
445 445
         } catch (\Exception $e) {
446 446
             return [];
447 447
         }

+ 1 - 1
app/common/dao/user/UserPvLogDao.php

@@ -81,7 +81,7 @@ class UserPvLogDao extends BaseDao
81 81
     public function saveAll($dataList): array
82 82
     {
83 83
         try {
84
-            return $this->getModel()->saveAll($dataList)->toArray();
84
+            return $this->getModel()::getInstance()->allowField(array_keys(reset($dataList)))->saveAll($dataList)->toArray();
85 85
         } catch (\Exception $e) {
86 86
             return [];
87 87
         }

+ 1 - 1
app/common/dao/user/UserSignGongxianDao.php

@@ -81,7 +81,7 @@ class UserSignGongxianDao extends BaseDao
81 81
     public function saveAll($dataList): array
82 82
     {
83 83
         try {
84
-            return $this->getModel()->saveAll($dataList)->toArray();
84
+            return $this->getModel()::getInstance()->allowField(array_keys(reset($dataList)))->saveAll($dataList)->toArray();
85 85
         } catch (\Exception $e) {
86 86
             return [];
87 87
         }

+ 1 - 1
app/common/dao/user/UserSignHongbaoDao.php

@@ -81,7 +81,7 @@ class UserSignHongbaoDao extends BaseDao
81 81
     public function saveAll($dataList): array
82 82
     {
83 83
         try {
84
-            return $this->getModel()->saveAll($dataList)->toArray();
84
+            return $this->getModel()::getInstance()->allowField(array_keys(reset($dataList)))->saveAll($dataList)->toArray();
85 85
         } catch (\Exception $e) {
86 86
             return [];
87 87
         }

+ 1 - 3
app/common/dao/user/UserSignScoreDao.php

@@ -37,8 +37,6 @@ class UserSignScoreDao extends BaseDao
37 37
                 ->whereIn('id', $idList)
38 38
                 ->select()
39 39
                 ->toArray();
40
-            Log::info('$dataRes - getUserSignScoreEntityListByIdList');
41
-            Log::info($dataRes);
42 40
             if (!empty($dataRes)) {
43 41
                 $entityList = array_map(function ($data) {
44 42
                     return UserSignScoreEntity::newInstance($data);
@@ -84,7 +82,7 @@ class UserSignScoreDao extends BaseDao
84 82
     public function saveAll($dataList): array
85 83
     {
86 84
         try {
87
-            return $this->getModel()->saveAll($dataList)->toArray();
85
+            return $this->getModel()::getInstance()->allowField(array_keys(reset($dataList)))->saveAll($dataList)->toArray();
88 86
         } catch (\Exception $e) {
89 87
             return [];
90 88
         }

+ 19 - 1
app/common/dao/user/UserSignVrDao.php

@@ -3,12 +3,16 @@
3 3
 namespace app\common\dao\user;
4 4
 
5 5
 use app\common\dao\BaseDao;
6
+use app\common\model\BaseModel;
6 7
 use app\common\model\user\UserSignVr;
7 8
 use app\entity\CommonEntity;
8 9
 use app\entity\data\user\UserSignVrEntity;
9 10
 
10 11
 class UserSignVrDao extends BaseDao
11 12
 {
13
+    /**
14
+     * @return BaseModel
15
+     */
12 16
     protected function getModel(): string
13 17
     {
14 18
         return UserSignVr::class;
@@ -18,7 +22,7 @@ class UserSignVrDao extends BaseDao
18 22
      * @param array $idList
19 23
      * @return CommonEntity[]
20 24
      */
21
-    public function getStoreSignVrEntityListByIdList(array $idList): array
25
+    public function getUserSignVrEntityListByIdList(array $idList): array
22 26
     {
23 27
         $entityList = [];
24 28
         try {
@@ -38,4 +42,18 @@ class UserSignVrDao extends BaseDao
38 42
         }
39 43
         return $entityList;
40 44
     }
45
+
46
+    /**
47
+     * 批量更新
48
+     * @param $dataList
49
+     * @return array
50
+     */
51
+    public function saveAll($dataList): array
52
+    {
53
+        try {
54
+            return $this->getModel()::getInstance()->allowField(array_keys(reset($dataList)))->saveAll($dataList)->toArray();
55
+        } catch (\Exception $e) {
56
+            return [];
57
+        }
58
+    }
41 59
 }

+ 46 - 42
app/common/repositories/store/order/StoreOrderRepository.php

@@ -81,7 +81,7 @@ use app\entity\data\store\StoreProductAttrValueEntity;
81 81
 use app\entity\data\store\StoreProductEntity;
82 82
 use app\entity\data\store\StoreGroupOrderEntity;
83 83
 use app\entity\data\store\StoreOrderEntity;
84
-use app\entity\data\user\AddressEntity;
84
+use app\entity\data\user\UserAddressEntity;
85 85
 use app\entity\data\user\UserBillEntity;
86 86
 use app\entity\data\user\UserEntity;
87 87
 use app\entity\monomer\store\FzonePayTypeEntity;
@@ -10719,17 +10719,17 @@ class StoreOrderRepository extends BaseRepository
10719 10719
     /**
10720 10720
      * 根据 用户信息 订单信息 支付信息 判断用户是否满足支付条件,并进行扣款
10721 10721
      * @param UserEntity $userEntity
10722
-     * @param StoreGroupOrderEntity $storeGroupOrderEntity
10722
+     * @param StoreOrderEntity $storeOrderEntity
10723 10723
      * @param FzonePayTypeEntity $fzonePayTypeEntity
10724 10724
      * @return bool
10725 10725
      */
10726
-    public function abatement(UserEntity $userEntity, StoreGroupOrderEntity $storeGroupOrderEntity, FzonePayTypeEntity $fzonePayTypeEntity): bool
10726
+    public function abatement(UserEntity $userEntity, StoreOrderEntity $storeOrderEntity, FzonePayTypeEntity $fzonePayTypeEntity): bool
10727 10727
     {
10728 10728
         if (empty($userEntity->getUid())) {
10729 10729
             throw new ValidateException('未查询到用户信息');
10730 10730
         }
10731 10731
 
10732
-        if (empty($storeGroupOrderEntity->getGroupOrderId())) {
10732
+        if (empty($storeOrderEntity->getOrderId())) {
10733 10733
             throw new ValidateException('未查询到订单信息');
10734 10734
         }
10735 10735
 
@@ -10753,9 +10753,9 @@ class StoreOrderRepository extends BaseRepository
10753 10753
                 $userEntity->getUid(),
10754 10754
                 UserSignVrEnum::TYPE['Consume']['code'],
10755 10755
                 $fzonePayTypeEntity->getPrice(),
10756
-                '购买商品,订单编号:' . $storeGroupOrderEntity->getGroupOrderSn(),
10757
-                CommonEnum::ORDER_TYPE['Platform-Group']['code'],
10758
-                $storeGroupOrderEntity->getGroupOrderId()
10756
+                '购买商品,订单编号:' . $storeOrderEntity->getOrderSn(),
10757
+                UserSignVrEnum::ORDER_TYPE['Platform']['code'],
10758
+                $storeOrderEntity->getOrderId()
10759 10759
             );
10760 10760
             // 执行 Vr 增减 操作
10761 10761
             $userSignVrRepository->execute($userSignVrEntity->getId());
@@ -10766,9 +10766,9 @@ class StoreOrderRepository extends BaseRepository
10766 10766
                 UserSignScoreEnum::SOURCE_TYPE['SelfOrder']['code'],
10767 10767
                 UserSignScoreEnum::PM['Expend']['code'],
10768 10768
                 $fzonePayTypeEntity->getOther(),
10769
-                '购买商品,订单编号:' . $storeGroupOrderEntity->getGroupOrderSn(),
10770
-                UserSignHongbaoEnum::ORDER_TYPE['Platform']['code'],
10771
-                $storeGroupOrderEntity->getGroupOrderId()
10769
+                '购买商品,订单编号:' . $storeOrderEntity->getOrderSn(),
10770
+                UserSignScoreEnum::ORDER_TYPE['Platform']['code'],
10771
+                $storeOrderEntity->getOrderId()
10772 10772
             );
10773 10773
             $userSignScoreRepository->execute($userSignScoreEntity->getId());
10774 10774
 
@@ -10787,9 +10787,9 @@ class StoreOrderRepository extends BaseRepository
10787 10787
                 $userEntity->getUid(),
10788 10788
                 UserSignVrEnum::TYPE['Consume']['code'],
10789 10789
                 $fzonePayTypeEntity->getPrice(),
10790
-                '购买商品,订单编号:' . $storeGroupOrderEntity->getGroupOrderSn(),
10791
-                CommonEnum::ORDER_TYPE['Platform-Group']['code'],
10792
-                $storeGroupOrderEntity->getGroupOrderId()
10790
+                '购买商品,订单编号:' . $storeOrderEntity->getOrderSn(),
10791
+                UserSignVrEnum::ORDER_TYPE['Platform']['code'],
10792
+                $storeOrderEntity->getOrderId()
10793 10793
             );
10794 10794
             // 执行 Vr 增减 操作
10795 10795
             $userSignVrRepository->execute($userSignVrEntity->getId());
@@ -10800,9 +10800,9 @@ class StoreOrderRepository extends BaseRepository
10800 10800
                 UserSignJingdouEnum::TYPE['Consume']['code'],
10801 10801
                 $fzonePayTypeEntity->getOther(),
10802 10802
                 0,
10803
-                '购买商品,订单编号:' . $storeGroupOrderEntity->getGroupOrderSn(),
10804
-                CommonEnum::ORDER_TYPE['Platform-Group']['code'],
10805
-                $storeGroupOrderEntity->getGroupOrderId()
10803
+                '购买商品,订单编号:' . $storeOrderEntity->getOrderSn(),
10804
+                CommonEnum::ORDER_TYPE['Platform']['code'],
10805
+                $storeOrderEntity->getOrderId()
10806 10806
             );
10807 10807
             // 执行 京豆 增减 操作
10808 10808
             $userSignJingdouRepository->execute($userSignJingdouEntity->getId());
@@ -10821,9 +10821,9 @@ class StoreOrderRepository extends BaseRepository
10821 10821
                 $userEntity->getUid(),
10822 10822
                 UserSignVrEnum::TYPE['Consume']['code'],
10823 10823
                 $fzonePayTypeEntity->getPrice(),
10824
-                '购买商品,订单编号:' . $storeGroupOrderEntity->getGroupOrderSn(),
10825
-                CommonEnum::ORDER_TYPE['Platform-Group']['code'],
10826
-                $storeGroupOrderEntity->getGroupOrderId()
10824
+                '购买商品,订单编号:' . $storeOrderEntity->getOrderSn(),
10825
+                CommonEnum::ORDER_TYPE['Platform']['code'],
10826
+                $storeOrderEntity->getOrderId()
10827 10827
             );
10828 10828
             // 执行 Vr 增减 操作
10829 10829
             $userSignVrRepository->execute($userSignVrEntity->getId());
@@ -10837,9 +10837,9 @@ class StoreOrderRepository extends BaseRepository
10837 10837
                 $userEntity->getUid(),
10838 10838
                 UserSignVrEnum::TYPE['Consume']['code'],
10839 10839
                 $fzonePayTypeEntity->getPrice(),
10840
-                '购买商品,订单编号:' . $storeGroupOrderEntity->getGroupOrderSn(),
10841
-                CommonEnum::ORDER_TYPE['Platform-Group']['code'],
10842
-                $storeGroupOrderEntity->getGroupOrderId()
10840
+                '购买商品,订单编号:' . $storeOrderEntity->getOrderSn(),
10841
+                CommonEnum::ORDER_TYPE['Platform']['code'],
10842
+                $storeOrderEntity->getOrderId()
10843 10843
             );
10844 10844
             // 执行 Vr 增减 操作
10845 10845
             $userSignVrRepository->execute($userSignVrEntity->getId());
@@ -10861,9 +10861,9 @@ class StoreOrderRepository extends BaseRepository
10861 10861
                 UserSignFugouEnum::TYPE['Give']['code'],
10862 10862
                 $fzonePayTypeEntity->getPrice(),
10863 10863
                 UserSignFugouEnum::COMMISSION_TYPE['DIRECT_REFERRAL']['code'],
10864
-                '购买商品,订单编号:' . $storeGroupOrderEntity->getGroupOrderSn(),
10865
-                CommonEnum::ORDER_TYPE['Platform-Group']['code'],
10866
-                $storeGroupOrderEntity->getGroupOrderId()
10864
+                '购买商品,订单编号:' . $storeOrderEntity->getOrderSn(),
10865
+                CommonEnum::ORDER_TYPE['Platform']['code'],
10866
+                $storeOrderEntity->getOrderId()
10867 10867
             );
10868 10868
             // 执行
10869 10869
             $userSignFugouRepository->execute($userSignFugouEntity->getId());
@@ -11708,7 +11708,7 @@ class StoreOrderRepository extends BaseRepository
11708 11708
         $cartEntityList = $verifyResult['cartEntityList'];
11709 11709
         $cartEntityMap = array_column($cartEntityList, null, 'cartId');
11710 11710
         $cartIdList = array_keys($cartEntityMap);
11711
-        /** @var AddressEntity $addressEntity 地址信息 */
11711
+        /** @var UserAddressEntity $addressEntity 地址信息 */
11712 11712
         $addressEntity = $verifyResult['addressEntity'];
11713 11713
         /** @var ShareEntity $shareEntity 订单所带的分享信息 */
11714 11714
         $shareEntity = $verifyResult['shareEntity'];
@@ -11993,33 +11993,29 @@ class StoreOrderRepository extends BaseRepository
11993 11993
             ->setFzonePaytype($storeOrderCreateRequestEntity->getFzonePayType());
11994 11994
 
11995 11995
         // 4、写入数据
11996
-        Db::startTrans();
11996
+        // Db::startTrans();
11997 11997
         try {
11998 11998
             // 4.1 更细库存
11999
-            foreach ($productStockList as $item) {
12000
-                $productRepository->descStock($item['productId'], $item['cartNum']);
12001
-            }
12002
-            foreach ($productAttrValueStockList as $item) {
12003
-                $productAttrValueRepository->descStock($item['productId'], $item['unique'], $item['cartNum']);
12004
-            }
11999
+            // foreach ($productStockList as $item) {
12000
+            //     $productRepository->descStock($item['productId'], $item['cartNum']);
12001
+            // }
12002
+            // foreach ($productAttrValueStockList as $item) {
12003
+            //     $productAttrValueRepository->descStock($item['productId'], $item['unique'], $item['cartNum']);
12004
+            // }
12005 12005
 
12006 12006
             // 4.2 修改 购物车状态
12007
-            $storeCartRepository->updateIsPayByCartIdList($cartIdList);
12007
+            // $storeCartRepository->updateIsPayByCartIdList($cartIdList);
12008 12008
 
12009 12009
             // 4.3 写入 组合订单 (支付订单)
12010 12010
             /** @var StoreGroupOrderRepository $storeGroupOrderRepository */
12011 12011
             $storeGroupOrderRepository = app()->make(StoreGroupOrderRepository::class);
12012 12012
             $storeGroupOrderEntity = $storeGroupOrderRepository->createByEntity($storeGroupOrderEntity);
12013 12013
 
12014
-            // 4.4 验证是否 可以进行支付
12015
-            /** @var FzonePayTypeEntity $fzonePayTypeEntity */
12016
-            $fzonePayTypeEntity = FzonePayTypeEntity::newInstance($storeOrderCreateRequestEntity->getFzonePayType());
12017
-            $paySuccess = $this->abatement($userEntity, $storeGroupOrderEntity, $fzonePayTypeEntity);
12018
-
12019 12014
             // 4.5 写入订单数据
12020 12015
             $storeOrderStatusDataList = [];
12021 12016
             $storeOrderProductDataList = [];
12022 12017
             $storeOrderIdList = [];
12018
+            $paySuccess = true; // 是否已完成支付 并支付成功
12023 12019
             foreach ($storeOrderEntityList as $key => $storeOrderEntity) {
12024 12020
                 // 获取当前 订单绑定的购物车
12025 12021
                 $cartEntity = $cartEntityMap[$storeOrderEntity->getCartId()];
@@ -12031,6 +12027,14 @@ class StoreOrderRepository extends BaseRepository
12031 12027
                 $storeOrderEntityList[$key] = $storeOrderEntity;
12032 12028
                 $storeOrderIdList[] = $storeOrderEntity->getOrderId();
12033 12029
 
12030
+                // 4.4 验证是否 可以进行支付 因为历史的 用户资金(佣金、养老金、积分、VR等)扣减所绑定的orderId都是订单ID
12031
+                /** @var FzonePayTypeEntity $fzonePayTypeEntity */
12032
+                $fzonePayTypeEntity = FzonePayTypeEntity::newInstance($storeOrderCreateRequestEntity->getFzonePayType());
12033
+                // 当有一笔支付失败时,默认整个 订单组 没有支付成功
12034
+                if (!$this->abatement($userEntity, $storeOrderEntity, $fzonePayTypeEntity)) {
12035
+                    $paySuccess = false;
12036
+                }
12037
+
12034 12038
                 // 将每件商品设计到的优惠券要取消掉
12035 12039
 
12036 12040
                 // 准备订单的 状态数据
@@ -12083,7 +12087,7 @@ class StoreOrderRepository extends BaseRepository
12083 12087
                     'paid' => StoreOrderEnum::PAID['YES']['code'],
12084 12088
                     'pay_time' => date('Y-m-d H:i:s'),
12085 12089
                     'status' => StoreOrderEnum::STATUS['WAITING_SHIPMENT']['code'],
12086
-                    'distribution_mode' => StoreOrderEnum::DISTRIBUTION_MODE['ExpressDelivery']
12090
+                    'distribution_mode' => StoreOrderEnum::DISTRIBUTION_MODE['ExpressDelivery']['code']
12087 12091
                 ]);
12088 12092
                 $settlementOrderIdList = [];
12089 12093
                 foreach ($storeOrderEntityList as $storeOrderEntity) {
@@ -12100,9 +12104,9 @@ class StoreOrderRepository extends BaseRepository
12100 12104
                 }
12101 12105
             }
12102 12106
 
12103
-            Db::commit();
12107
+            // Db::commit();
12104 12108
         } catch (DbException $e) {
12105
-            Db::rollback();
12109
+            // Db::rollback();
12106 12110
         }
12107 12111
         return ['order_id' => $storeGroupOrderEntity->getGroupOrderId(), 'groupOrder' => $storeGroupOrderEntity->toArray()];
12108 12112
 

+ 4 - 4
app/common/repositories/user/UserAddressRepository.php

@@ -10,7 +10,7 @@ namespace app\common\repositories\user;
10 10
 use app\common\repositories\BaseRepository;
11 11
 use app\common\dao\user\UserAddressDao as dao;
12 12
 use app\common\repositories\store\shipping\CityRepository;
13
-use app\entity\data\user\AddressEntity;
13
+use app\entity\data\user\UserAddressEntity;
14 14
 
15 15
 /**
16 16
  * Class UserAddressRepository
@@ -128,11 +128,11 @@ class UserAddressRepository extends BaseRepository
128 128
      * 根据 地址ID 获取地址实体
129 129
      *
130 130
      * @param $addressId
131
-     * @return AddressEntity
131
+     * @return UserAddressEntity
132 132
      */
133
-    public function getAddressEntityByAddressId($addressId): AddressEntity
133
+    public function getAddressEntityByAddressId($addressId): UserAddressEntity
134 134
     {
135
-        /** @var AddressEntity $addressEntity */
135
+        /** @var UserAddressEntity $addressEntity */
136 136
         $addressEntity = $this->dao->getAddressEntityByAddressId($addressId);
137 137
         return $addressEntity;
138 138
     }

+ 1 - 1
app/common/repositories/user/UserRepository.php

@@ -4575,7 +4575,7 @@ class UserRepository extends BaseRepository
4575 4575
             $userSignScoreEntity = UserSignScoreEntity::newInstance();
4576 4576
             $userSignScoreEntity->setUid($uid)
4577 4577
                 ->setPm($type)
4578
-                ->setRewardScore($score)
4578
+                ->setRewardSocre($score)
4579 4579
                 ->setAddtime(time())
4580 4580
                 ->setStatus(UserSignScoreEnum::STATUS['Valid']['code'])
4581 4581
                 ->setOrderType($orderType)

+ 5 - 5
app/common/repositories/user/UserSignScoreRepository.php

@@ -65,7 +65,7 @@ class UserSignScoreRepository extends BaseRepository
65 65
      */
66 66
     public function createByEntity(UserSignScoreEntity $userSignScoreEntity): UserSignScoreEntity
67 67
     {
68
-        $result = $this->dao->create($userSignScoreEntity->toUnderlineArray())->toArray();
68
+        $result = $this->create($userSignScoreEntity->toUnderlineArray())->toArray();
69 69
         /** @var UserSignScoreEntity $entity */
70 70
         $entity = UserSignScoreEntity::newInstance($result);
71 71
         return $entity;
@@ -103,7 +103,7 @@ class UserSignScoreRepository extends BaseRepository
103 103
         $userSignScoreEntity->setUid($uid)
104 104
             ->setSourceType($sourceType)
105 105
             ->setPm($type)
106
-            ->setRewardScore($number)
106
+            ->setRewardSocre($number)
107 107
             ->setMark($mark)
108 108
             ->setOrderType($orderType)
109 109
             ->setOrderId($orderId)
@@ -200,12 +200,12 @@ class UserSignScoreRepository extends BaseRepository
200 200
 
201 201
                 if ($userSignScoreEntity->getPm() == UserSignScoreEnum::PM['Expend']['code']) {
202 202
                     // 支出
203
-                    $updateUserEntity->setScore(bcsub($updateUserEntity->getScore(), $userSignScoreEntity->getRewardScore(), 2));
203
+                    $updateUserEntity->setScore(bcsub($updateUserEntity->getScore(), $userSignScoreEntity->getRewardSocre(), 2));
204 204
                     if ($updateUserEntity->getScore() < 0.00) {
205 205
                         throw new ValidateException('用户积分不足');
206 206
                     }
207 207
                 } else {
208
-                    $updateUserEntity->setScore(bcadd($updateUserEntity->getScore(), $userSignScoreEntity->getRewardScore(), 2));
208
+                    $updateUserEntity->setScore(bcadd($updateUserEntity->getScore(), $userSignScoreEntity->getRewardSocre(), 2));
209 209
                 }
210 210
                 $updateUserSignScoreEntity->setSurplus($updateUserEntity->getScore());
211 211
 
@@ -221,7 +221,7 @@ class UserSignScoreRepository extends BaseRepository
221 221
                     );
222 222
                 }
223 223
 
224
-                if (!empty($updateUserBillEntityList)) {
224
+                if (!empty($updateUserScoreEntityList)) {
225 225
                     $this->batchUpdateUserSignScoreDataByDataList(
226 226
                         array_map(function (UserSignScoreEntity $updateUserSignScoreEntity) {
227 227
                             return $updateUserSignScoreEntity->toUnderlineArray();

+ 115 - 37
app/common/repositories/user/UserSignVrRepository.php

@@ -6,6 +6,7 @@ use app\common\dao\user\UserSignVrDao;
6 6
 use app\common\enum\user\UserSignVrEnum;
7 7
 use app\common\repositories\BaseRepository;
8 8
 use app\common\repositories\store\order\StoreOrderRepository;
9
+use app\entity\data\user\UserEntity;
9 10
 use app\entity\data\user\UserSignVrEntity;
10 11
 use think\db\exception\DbException;
11 12
 use think\exception\ValidateException;
@@ -26,9 +27,9 @@ class UserSignVrRepository extends BaseRepository
26 27
      * @param int $id
27 28
      * @return UserSignVrEntity
28 29
      */
29
-    public function getStoreSignVrEntityById(int $id): UserSignVrEntity
30
+    public function getUserSignVrEntityById(int $id): UserSignVrEntity
30 31
     {
31
-        $entityList = $this->getStoreSignVrEntityListByIdList([$id]);
32
+        $entityList = $this->getUserSignVrEntityListByIdList([$id]);
32 33
         $entity = array_shift($entityList);
33 34
         if ($entity instanceof UserSignVrEntity) {
34 35
             return $entity;
@@ -42,9 +43,9 @@ class UserSignVrRepository extends BaseRepository
42 43
      * @param array $idList
43 44
      * @return UserSignVrEntity[]
44 45
      */
45
-    public function getStoreSignVrEntityListByIdList(array $idList): array
46
+    public function getUserSignVrEntityListByIdList(array $idList): array
46 47
     {
47
-        return $this->dao->getStoreSignVrEntityListByIdList($idList);
48
+        return $this->dao->getUserSignVrEntityListByIdList($idList);
48 49
     }
49 50
 
50 51
     /**
@@ -102,44 +103,121 @@ class UserSignVrRepository extends BaseRepository
102 103
     /**
103 104
      * 将 Vr 记录设置为生效状态 并对用户的 Vr 字段进行增减
104 105
      * @param int $id
105
-     * @return UserSignVrEntity
106
+     * @return int
106 107
      */
107
-    public function execute(int $id): UserSignVrEntity
108
+    public function execute(int $id): int
108 109
     {
109
-        $userSignVrEntity = $this->getStoreSignVrEntityById($id);
110
-        if (empty($userSignVrEntity->getId()) || empty($userSignVrEntity->getUid())) {
111
-            throw new ValidateException('无效的Vr记录');
112
-        }
113
-        if (!empty($userSignVrEntity->getSettlementTime())) {
114
-            throw new ValidateException('该Vr记录已更新,请勿重复操作');
115
-        }
110
+        $result = $this->executeByIdList([$id]);
111
+        return array_shift($result);
112
+    }
116 113
 
117
-        /** @var UserRepository $userRepository */
118
-        $userRepository = app()->make(UserRepository::class);
119
-        $userEntity = $userRepository->getUserEntityByUid($userSignVrEntity->getUid());
120
-        if (empty($userEntity->getUid())) {
121
-            throw new ValidateException('未查询到用户信息');
122
-        }
123
-        if ($userSignVrEntity->getType() == UserSignVrEnum::TYPE['Consume']['code']) {
124
-            $surplus = bcsub($userEntity->getVr(), $userSignVrEntity->getNumber(), 2);
125
-            if ($surplus < 0.00) {
126
-                throw new ValidateException('用户VR不足');
114
+    /**
115
+     * @param array $idList
116
+     * @return array
117
+     */
118
+    public function executeByIdList(array $idList): array
119
+    {
120
+        $userSignVrEntityList = $this->getUserSignVrEntityListByIdList($idList);
121
+        $userIdList = [];
122
+
123
+        // 忽略 已经生效的 记录
124
+        $userSignVrEntityList = array_filter($userSignVrEntityList, function ($entity) use (&$userIdList) {
125
+            // VR 结算字段为空
126
+            if (empty($entity->getSettlementTime()) && !empty($entity->getUid())) {
127
+                $userIdList[] = $entity->getUid();
128
+                return true;
127 129
             }
128
-        } else {
129
-            $surplus = bcadd($userEntity->getVr(), $userSignVrEntity->getNumber(), 2);
130
-        }
131
-        try {
132
-            $userSignVrEntity
133
-                ->setSurplus($surplus)
134
-                ->setSettlementTime(date('Y-m-d H:i:s'));
135
-            $userRepository->update($userEntity->getUid(), ['vr' => $surplus]);
136
-            $this->dao->update($userSignVrEntity->getId(), [
137
-                'surplus' => $userSignVrEntity->getSurplus(),
138
-                'settlement_time' => $userSignVrEntity->getSettlementTime()
139
-            ]);
140
-        } catch (DbException $e) {
130
+            return false;
131
+        });
132
+
133
+        if (!empty($userSignVrEntityList)) {
134
+            // 获取用户 映射信息
135
+            /** @var UserRepository $userRepository */
136
+            $userRepository = app()->make(UserRepository::class);
137
+            /** @var UserEntity[] $userEntityMapByUid */
138
+            $userEntityMapByUid = [];
139
+            if (!empty($userIdList)) {
140
+                $userEntityMapByUid = $userRepository->getUserEntityMapByUidList($userIdList);
141
+            }
142
+
143
+            /** @var UserEntity[] $updateUserEntityList */
144
+            $updateUserEntityList = [];
145
+            /** @var UserSignVrEntity[] $updateUserVrEntityList */
146
+            $updateUserVrEntityList = [];
147
+            foreach ($userSignVrEntityList as $userSignVrEntity) {
148
+
149
+                $userEntity = $userEntityMapByUid[$userSignVrEntity->getUid()];
150
+                if (empty($userEntity) || empty($userEntity->getUid())) {
151
+                    throw new ValidateException("未查询到用户信息(vrId:{$userSignVrEntity->getId()})");
152
+                }
153
+
154
+                // 组建 更新 用户信息
155
+                if (isset($updateUserEntityList[$userEntity->getUid()])) {
156
+                    $updateUserEntity = $updateUserEntityList[$userEntity->getUid()];
157
+                } else {
158
+                    /** @var UserEntity $updateUserEntity */
159
+                    $updateUserEntity = UserEntity::newInstance();
160
+                    $updateUserEntity
161
+                        ->setUid($userEntity->getUid())
162
+                        ->setVr($userEntity->getVr());
141 163
 
164
+                }
165
+                // 组建 账单 记录
166
+                if (isset($updateUserVrEntityList[$userSignVrEntity->getId()])) {
167
+                    $updateUserSignVrEntity = $updateUserVrEntityList[$userSignVrEntity->getId()];
168
+                } else {
169
+                    /** @var UserSignVrEntity $updateUserSignVrEntity */
170
+                    $updateUserSignVrEntity = UserSignVrEntity::newInstance();
171
+                    // 更新 账单记录 状态
172
+                    $updateUserSignVrEntity
173
+                        ->setId($userSignVrEntity->getId())
174
+                        ->setSettlementTime(date('Y-m-d H:i:s'));
175
+                }
176
+
177
+                if ($userSignVrEntity->getType() == UserSignVrEnum::TYPE['Consume']['code']) {
178
+                    // 消耗
179
+                    $updateUserEntity->setVr(bcsub($updateUserEntity->getVr(), $userSignVrEntity->getNumber(), 2));
180
+                    if ($updateUserEntity->getVr() < 0.00) {
181
+                        throw new ValidateException('用户Vr不足');
182
+                    }
183
+                } else {
184
+                    $updateUserEntity->setVr(bcadd($updateUserEntity->getVr(), $userSignVrEntity->getNumber(), 2));
185
+                }
186
+                $updateUserSignVrEntity->setSurplus($updateUserEntity->getVr());
187
+
188
+                $updateUserEntityList[$userSignVrEntity->getUid()] = $updateUserEntity;
189
+                $updateUserVrEntityList[$userSignVrEntity->getId()] = $updateUserSignVrEntity;
190
+            }
191
+
192
+            try {
193
+                if (!empty($updateUserEntityList)) {
194
+                    $userRepository->batchUpdateUserDataByDataList(
195
+                        array_map(function (UserEntity $updateUserEntity) {
196
+                            return $updateUserEntity->toUnderlineArray();
197
+                        }, $updateUserEntityList)
198
+                    );
199
+                }
200
+
201
+                if (!empty($updateUserVrEntityList)) {
202
+                    $this->batchUpdateUserSignVrDataByDataList(
203
+                        array_map(function (UserSignVrEntity $updateUserSignVrEntity) {
204
+                            return $updateUserSignVrEntity->toUnderlineArray();
205
+                        }, $updateUserVrEntityList)
206
+                    );
207
+                }
208
+            } catch (DbException $e) {
209
+
210
+            }
142 211
         }
143
-        return $userSignVrEntity;
212
+        return $idList;
213
+    }
214
+
215
+    /**
216
+     * @param $dataList
217
+     * @return array
218
+     */
219
+    public function batchUpdateUserSignVrDataByDataList($dataList): array
220
+    {
221
+        return $this->dao->saveAll($dataList);
144 222
     }
145 223
 }

+ 6 - 6
app/controller/api/Auth.php

@@ -63,7 +63,7 @@ use think\Response;
63 63
  * @author xaboy
64 64
  * @day 2020-05-06
65 65
  */
66
-class Auth extends BaseController
66
+class Auth
67 67
 {
68 68
     use HaikeApiRequest;
69 69
     use HuiPay;
@@ -72,9 +72,9 @@ class Auth extends BaseController
72 72
     protected $source;
73 73
     public function __construct(App $app)
74 74
     {
75
-        parent::__construct($app);
76
-        $this->source = $this->request->header('source');
77
-        $this->merId =  $this->request->header('merId');
75
+        // parent::__construct($app);
76
+        // $this->source = $this->request->header('source');
77
+        // $this->merId =  $this->request->header('merId');
78 78
     }
79 79
 
80 80
     /**
@@ -1559,12 +1559,12 @@ class Auth extends BaseController
1559 1559
     }
1560 1560
     public function smsLogin(UserAuthValidate $validate, UserRepository $repository)
1561 1561
     {
1562
-        $data = $this->request->params(['phone', 'sms_code', 'spread', 'share_id']);
1562
+        $data = request()->only(['phone', 'sms_code', 'spread', 'share_id']);
1563 1563
 //        $data = $this->request->params(['phone', 'sms_code']);
1564 1564
 
1565 1565
         $validate->sceneSmslogin()->check($data);
1566 1566
 
1567
-        $domain = $this->request->domain();
1567
+        // $domain = $this->request->domain();
1568 1568
 
1569 1569
         //如果手机验证码错误并且验证码不是6865,进入查验团队验证码环节
1570 1570
         if (!$this->checkSmsCode($data['phone'], $data['sms_code']) && $data['sms_code'] !== '6865') {

+ 38 - 0
app/entity/data/store/StoreOrderEntity.php

@@ -2,7 +2,9 @@
2 2
 
3 3
 namespace app\entity\data\store;
4 4
 
5
+use app\common\enum\store\StoreOrderEnum;
5 6
 use app\entity\data\DataEntity;
7
+use app\entity\monomer\store\FzonePayTypeEntity;
6 8
 
7 9
 class StoreOrderEntity extends DataEntity
8 10
 {
@@ -1617,6 +1619,7 @@ class StoreOrderEntity extends DataEntity
1617 1619
             unset($fzonePaytypePre);
1618 1620
         }
1619 1621
         $this->fzonePaytype = $fzonePaytype;
1622
+        $this->deconstructionFzonePaytype();
1620 1623
         return $this;
1621 1624
     }
1622 1625
 
@@ -1745,4 +1748,39 @@ class StoreOrderEntity extends DataEntity
1745 1748
         $this->fzonePayType = $fzonePayType;
1746 1749
         return $this;
1747 1750
     }
1751
+
1752
+    public function deconstructionFzonePaytype()
1753
+    {
1754
+        if (!empty($this->getFzonePayType()) && is_array(json_decode($this->getFzonePayType(), true))) {
1755
+            /** @var FzonePayTypeEntity $fzonePayTypeEntity */
1756
+            $fzonePayTypeEntity = FzonePayTypeEntity::newInstance(json_decode($this->getFzonePayType(), true));
1757
+            $this->setFzonePayNote($fzonePayTypeEntity->getNote());
1758
+            $this->setFzonePayTypeBySplit($fzonePayTypeEntity->getType());
1759
+            // 验证支付方式
1760
+            if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['B1-VR+Score']['code']) {
1761
+                $this->setFzonePayVr($fzonePayTypeEntity->getPrice());
1762
+                $this->setFzonePayJifen($fzonePayTypeEntity->getOther());
1763
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['B2-Cash+Score']['code']) {
1764
+                $this->setFzonePayPrice($fzonePayTypeEntity->getPrice());
1765
+                $this->setFzonePayJifen($fzonePayTypeEntity->getOther());
1766
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['B3-VR+Jingdou']['code']) {
1767
+                $this->setFzonePayVr($fzonePayTypeEntity->getPrice());
1768
+                $this->setFzonePayJingdou($fzonePayTypeEntity->getOther());
1769
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['B4-Cash+Jingdou']['code']) {
1770
+                $this->setFzonePayPrice($fzonePayTypeEntity->getPrice());
1771
+                $this->setFzonePayJingdou($fzonePayTypeEntity->getOther());
1772
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['B5-VR']['code']) {
1773
+                $this->setFzonePayVr($fzonePayTypeEntity->getPrice());
1774
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['A1-VR']['code']) {
1775
+                $this->setFzonePayVr($fzonePayTypeEntity->getPrice());
1776
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['A2-Cash']['code']) {
1777
+                $this->setFzonePayPrice($fzonePayTypeEntity->getPrice());
1778
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['A3-Cash+VR']['code']) {
1779
+                $this->setFzonePayPrice($fzonePayTypeEntity->getPrice());
1780
+                $this->setFzonePayVr($fzonePayTypeEntity->getOther());
1781
+            } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['C1-Fugou']['code']) {
1782
+                $this->setFzonePayOther($fzonePayTypeEntity->getPrice());
1783
+            }
1784
+        }
1785
+    }
1748 1786
 }

+ 0 - 247
app/entity/data/user/AddressEntity.php

@@ -1,247 +0,0 @@
1
-<?php
2
-
3
-namespace app\entity\data\user;
4
-
5
-use app\entity\data\DataEntity;
6
-
7
-class AddressEntity extends DataEntity
8
-{
9
-    public $addressId = 0;  // 用户地址id
10
-    public $uid = 0;  // 用户id
11
-    public $realName = '';  // 收货人姓名
12
-    public $phone = '';  // 收货人电话
13
-    public $province = '';  // 收货人所在省
14
-    public $city = '';  // 收货人所在市
15
-    public $cityId = 0;  // 城市id
16
-    public $district = '';  // 收货人所在区
17
-    public $village = '';  // 收货人所在村
18
-    public $villageId = 0;  // 村id
19
-    public $detail = '';  // 收货人详细地址
20
-    public $postCode = 0;  // 邮编
21
-    public $longitude = '0';  // 经度
22
-    public $latitude = '0';  // 纬度
23
-    public $isDefault = 0;  // 是否默认
24
-    public $isDel = 0;  // 是否删除
25
-    public $createTime = null;  // 添加时间
26
-    public $codeList = '';  // 地址id(regions)
27
-
28
-    public $codeListByDecode = [];  // 地址id(regions)
29
-
30
-    public function getAddressId(): int
31
-    {
32
-        return $this->addressId;
33
-    }
34
-
35
-    public function setAddressId(int $addressId): AddressEntity
36
-    {
37
-        $this->addressId = $addressId;
38
-        return $this;
39
-    }
40
-
41
-    public function getUid(): int
42
-    {
43
-        return $this->uid;
44
-    }
45
-
46
-    public function setUid(int $uid): AddressEntity
47
-    {
48
-        $this->uid = $uid;
49
-        return $this;
50
-    }
51
-
52
-    public function getRealName(): string
53
-    {
54
-        return $this->realName;
55
-    }
56
-
57
-    public function setRealName(string $realName): AddressEntity
58
-    {
59
-        $this->realName = $realName;
60
-        return $this;
61
-    }
62
-
63
-    public function getPhone(): string
64
-    {
65
-        return $this->phone;
66
-    }
67
-
68
-    public function setPhone(string $phone): AddressEntity
69
-    {
70
-        $this->phone = $phone;
71
-        return $this;
72
-    }
73
-
74
-    public function getProvince(): string
75
-    {
76
-        return $this->province;
77
-    }
78
-
79
-    public function setProvince(string $province): AddressEntity
80
-    {
81
-        $this->province = $province;
82
-        return $this;
83
-    }
84
-
85
-    public function getCity(): string
86
-    {
87
-        return $this->city;
88
-    }
89
-
90
-    public function setCity(string $city): AddressEntity
91
-    {
92
-        $this->city = $city;
93
-        return $this;
94
-    }
95
-
96
-    public function getCityId(): int
97
-    {
98
-        return $this->cityId;
99
-    }
100
-
101
-    public function setCityId(int $cityId): AddressEntity
102
-    {
103
-        $this->cityId = $cityId;
104
-        return $this;
105
-    }
106
-
107
-    public function getDistrict(): string
108
-    {
109
-        return $this->district;
110
-    }
111
-
112
-    public function setDistrict(string $district): AddressEntity
113
-    {
114
-        $this->district = $district;
115
-        return $this;
116
-    }
117
-
118
-    public function getVillage(): string
119
-    {
120
-        return $this->village;
121
-    }
122
-
123
-    public function setVillage(string $village): AddressEntity
124
-    {
125
-        $this->village = $village;
126
-        return $this;
127
-    }
128
-
129
-    public function getVillageId(): int
130
-    {
131
-        return $this->villageId;
132
-    }
133
-
134
-    public function setVillageId(int $villageId): AddressEntity
135
-    {
136
-        $this->villageId = $villageId;
137
-        return $this;
138
-    }
139
-
140
-    public function getDetail(): string
141
-    {
142
-        return $this->detail;
143
-    }
144
-
145
-    public function setDetail(string $detail): AddressEntity
146
-    {
147
-        $this->detail = $detail;
148
-        return $this;
149
-    }
150
-
151
-    public function getPostCode(): int
152
-    {
153
-        return $this->postCode;
154
-    }
155
-
156
-    public function setPostCode(int $postCode): AddressEntity
157
-    {
158
-        $this->postCode = $postCode;
159
-        return $this;
160
-    }
161
-
162
-    public function getLongitude(): string
163
-    {
164
-        return $this->longitude;
165
-    }
166
-
167
-    public function setLongitude(string $longitude): AddressEntity
168
-    {
169
-        $this->longitude = $longitude;
170
-        return $this;
171
-    }
172
-
173
-    public function getLatitude(): string
174
-    {
175
-        return $this->latitude;
176
-    }
177
-
178
-    public function setLatitude(string $latitude): AddressEntity
179
-    {
180
-        $this->latitude = $latitude;
181
-        return $this;
182
-    }
183
-
184
-    public function getIsDefault(): int
185
-    {
186
-        return $this->isDefault;
187
-    }
188
-
189
-    public function setIsDefault(int $isDefault): AddressEntity
190
-    {
191
-        $this->isDefault = $isDefault;
192
-        return $this;
193
-    }
194
-
195
-    public function getIsDel(): int
196
-    {
197
-        return $this->isDel;
198
-    }
199
-
200
-    public function setIsDel(int $isDel): AddressEntity
201
-    {
202
-        $this->isDel = $isDel;
203
-        return $this;
204
-    }
205
-
206
-    /**
207
-     * @return string
208
-     */
209
-    public function getCreateTime(): ?string
210
-    {
211
-        return $this->createTime;
212
-    }
213
-
214
-    /**
215
-     * @param string $createTime
216
-     * @return AddressEntity
217
-     */
218
-    public function setCreateTime(string $createTime): AddressEntity
219
-    {
220
-        $this->createTime = $createTime;
221
-        return $this;
222
-    }
223
-
224
-    public function getCodeList(): string
225
-    {
226
-        return $this->codeList;
227
-    }
228
-
229
-    public function setCodeList(string $codeList): AddressEntity
230
-    {
231
-        $this->codeListByDecode = explode(',', $codeList);
232
-        $this->codeList = $codeList;
233
-        return $this;
234
-    }
235
-
236
-    public function getCodeListByDecode(): array
237
-    {
238
-        return $this->codeListByDecode;
239
-    }
240
-
241
-    public function setCodeListByDecode(array $codeListByDecode): AddressEntity
242
-    {
243
-        $this->codeListByDecode = $codeListByDecode;
244
-        $this->codeList = implode(',', $codeListByDecode);
245
-        return $this;
246
-    }
247
-}

+ 351 - 0
app/entity/data/user/UserAddressEntity.php

@@ -0,0 +1,351 @@
1
+<?php
2
+
3
+namespace app\entity\data\user;
4
+
5
+use app\entity\data\DataEntity;
6
+
7
+class UserAddressEntity extends DataEntity
8
+{
9
+    public $addressId = null;  // 用户地址id
10
+    public $uid = null;  // 用户id
11
+    public $realName = null;  // 收货人姓名
12
+    public $phone = null;  // 收货人电话
13
+    public $province = null;  // 收货人所在省
14
+    public $city = null;  // 收货人所在市
15
+    public $cityId = null;  // 城市id
16
+    public $district = null;  // 收货人所在区
17
+    public $village = null;  // 收货人所在村
18
+    public $villageId = null;  // 村id
19
+    public $detail = null;  // 收货人详细地址
20
+    public $postCode = null;  // 邮编
21
+    public $longitude = null;  // 经度
22
+    public $latitude = null;  // 纬度
23
+    public $isDefault = null;  // 是否默认
24
+    public $isDel = null;  // 是否删除
25
+    public $createTime = null;  // 添加时间
26
+    public $codeList = null;  // 地址id(regions)
27
+
28
+    /**
29
+     * @return mixed
30
+     */
31
+    public function getAddressId()
32
+    {
33
+        return $this->addressId;
34
+    }
35
+
36
+    /**
37
+     * @param mixed $addressId
38
+     * @return UserAddressEntity
39
+     */
40
+    public function setAddressId($addressId): UserAddressEntity
41
+    {
42
+        $this->addressId = $addressId;
43
+        return $this;
44
+    }
45
+
46
+    /**
47
+     * @return mixed
48
+     */
49
+    public function getUid()
50
+    {
51
+        return $this->uid;
52
+    }
53
+
54
+    /**
55
+     * @param mixed $uid
56
+     * @return UserAddressEntity
57
+     */
58
+    public function setUid($uid): UserAddressEntity
59
+    {
60
+        $this->uid = $uid;
61
+        return $this;
62
+    }
63
+
64
+    /**
65
+     * @return mixed
66
+     */
67
+    public function getRealName()
68
+    {
69
+        return $this->realName;
70
+    }
71
+
72
+    /**
73
+     * @param mixed $realName
74
+     * @return UserAddressEntity
75
+     */
76
+    public function setRealName($realName): UserAddressEntity
77
+    {
78
+        $this->realName = $realName;
79
+        return $this;
80
+    }
81
+
82
+    /**
83
+     * @return mixed
84
+     */
85
+    public function getPhone()
86
+    {
87
+        return $this->phone;
88
+    }
89
+
90
+    /**
91
+     * @param mixed $phone
92
+     * @return UserAddressEntity
93
+     */
94
+    public function setPhone($phone): UserAddressEntity
95
+    {
96
+        $this->phone = $phone;
97
+        return $this;
98
+    }
99
+
100
+    /**
101
+     * @return mixed
102
+     */
103
+    public function getProvince()
104
+    {
105
+        return $this->province;
106
+    }
107
+
108
+    /**
109
+     * @param mixed $province
110
+     * @return UserAddressEntity
111
+     */
112
+    public function setProvince($province): UserAddressEntity
113
+    {
114
+        $this->province = $province;
115
+        return $this;
116
+    }
117
+
118
+    /**
119
+     * @return mixed
120
+     */
121
+    public function getCity()
122
+    {
123
+        return $this->city;
124
+    }
125
+
126
+    /**
127
+     * @param mixed $city
128
+     * @return UserAddressEntity
129
+     */
130
+    public function setCity($city): UserAddressEntity
131
+    {
132
+        $this->city = $city;
133
+        return $this;
134
+    }
135
+
136
+    /**
137
+     * @return mixed
138
+     */
139
+    public function getCityId()
140
+    {
141
+        return $this->cityId;
142
+    }
143
+
144
+    /**
145
+     * @param mixed $cityId
146
+     * @return UserAddressEntity
147
+     */
148
+    public function setCityId($cityId): UserAddressEntity
149
+    {
150
+        $this->cityId = $cityId;
151
+        return $this;
152
+    }
153
+
154
+    /**
155
+     * @return mixed
156
+     */
157
+    public function getDistrict()
158
+    {
159
+        return $this->district;
160
+    }
161
+
162
+    /**
163
+     * @param mixed $district
164
+     * @return UserAddressEntity
165
+     */
166
+    public function setDistrict($district): UserAddressEntity
167
+    {
168
+        $this->district = $district;
169
+        return $this;
170
+    }
171
+
172
+    /**
173
+     * @return mixed
174
+     */
175
+    public function getVillage()
176
+    {
177
+        return $this->village;
178
+    }
179
+
180
+    /**
181
+     * @param mixed $village
182
+     * @return UserAddressEntity
183
+     */
184
+    public function setVillage($village): UserAddressEntity
185
+    {
186
+        $this->village = $village;
187
+        return $this;
188
+    }
189
+
190
+    /**
191
+     * @return mixed
192
+     */
193
+    public function getVillageId()
194
+    {
195
+        return $this->villageId;
196
+    }
197
+
198
+    /**
199
+     * @param mixed $villageId
200
+     * @return UserAddressEntity
201
+     */
202
+    public function setVillageId($villageId): UserAddressEntity
203
+    {
204
+        $this->villageId = $villageId;
205
+        return $this;
206
+    }
207
+
208
+    /**
209
+     * @return mixed
210
+     */
211
+    public function getDetail()
212
+    {
213
+        return $this->detail;
214
+    }
215
+
216
+    /**
217
+     * @param mixed $detail
218
+     * @return UserAddressEntity
219
+     */
220
+    public function setDetail($detail): UserAddressEntity
221
+    {
222
+        $this->detail = $detail;
223
+        return $this;
224
+    }
225
+
226
+    /**
227
+     * @return mixed
228
+     */
229
+    public function getPostCode()
230
+    {
231
+        return $this->postCode;
232
+    }
233
+
234
+    /**
235
+     * @param mixed $postCode
236
+     * @return UserAddressEntity
237
+     */
238
+    public function setPostCode($postCode): UserAddressEntity
239
+    {
240
+        $this->postCode = $postCode;
241
+        return $this;
242
+    }
243
+
244
+    /**
245
+     * @return mixed
246
+     */
247
+    public function getLongitude()
248
+    {
249
+        return $this->longitude;
250
+    }
251
+
252
+    /**
253
+     * @param mixed $longitude
254
+     * @return UserAddressEntity
255
+     */
256
+    public function setLongitude($longitude): UserAddressEntity
257
+    {
258
+        $this->longitude = $longitude;
259
+        return $this;
260
+    }
261
+
262
+    /**
263
+     * @return mixed
264
+     */
265
+    public function getLatitude()
266
+    {
267
+        return $this->latitude;
268
+    }
269
+
270
+    /**
271
+     * @param mixed $latitude
272
+     * @return UserAddressEntity
273
+     */
274
+    public function setLatitude($latitude): UserAddressEntity
275
+    {
276
+        $this->latitude = $latitude;
277
+        return $this;
278
+    }
279
+
280
+    /**
281
+     * @return mixed
282
+     */
283
+    public function getIsDefault()
284
+    {
285
+        return $this->isDefault;
286
+    }
287
+
288
+    /**
289
+     * @param mixed $isDefault
290
+     * @return UserAddressEntity
291
+     */
292
+    public function setIsDefault($isDefault): UserAddressEntity
293
+    {
294
+        $this->isDefault = $isDefault;
295
+        return $this;
296
+    }
297
+
298
+    /**
299
+     * @return mixed
300
+     */
301
+    public function getIsDel()
302
+    {
303
+        return $this->isDel;
304
+    }
305
+
306
+    /**
307
+     * @param mixed $isDel
308
+     * @return UserAddressEntity
309
+     */
310
+    public function setIsDel($isDel): UserAddressEntity
311
+    {
312
+        $this->isDel = $isDel;
313
+        return $this;
314
+    }
315
+
316
+    /**
317
+     * @return mixed
318
+     */
319
+    public function getCreateTime()
320
+    {
321
+        return $this->createTime;
322
+    }
323
+
324
+    /**
325
+     * @param mixed $createTime
326
+     * @return UserAddressEntity
327
+     */
328
+    public function setCreateTime($createTime): UserAddressEntity
329
+    {
330
+        $this->createTime = $createTime;
331
+        return $this;
332
+    }
333
+
334
+    /**
335
+     * @return mixed
336
+     */
337
+    public function getCodeList()
338
+    {
339
+        return $this->codeList;
340
+    }
341
+
342
+    /**
343
+     * @param mixed $codeList
344
+     * @return UserAddressEntity
345
+     */
346
+    public function setCodeList($codeList): UserAddressEntity
347
+    {
348
+        $this->codeList = $codeList;
349
+        return $this;
350
+    }
351
+}

+ 46 - 46
app/entity/data/user/UserSignFenrunEntity.php

@@ -6,156 +6,156 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserSignFenrunEntity extends DataEntity
8 8
 {
9
-    public $id = 0;  // 自增id
10
-    public $uid = 0;  // 会员id
11
-    public $number = 0.00;  // 数量
12
-    public $status = 0;  // 状态1已结算 0-已失效 -1未结算
13
-    public $mark = '';  // 备注
14
-    public $desc = '';  // 描述
15
-    public $orderId = '';  // 订单id
16
-    public $orderType = '';  // 订单类型。关联订单ID
9
+    public $id = null;  // 自增id
10
+    public $uid = null;  // 会员id
11
+    public $number = null;  // 数量
12
+    public $status = null;  // 状态1已结算 0-已失效 -1未结算
13
+    public $mark = null;  // 备注
14
+    public $desc = null;  // 描述
15
+    public $orderId = null;  // 订单id
16
+    public $orderType = null;  // 订单类型。关联订单ID
17 17
     public $settlementTime = null;  // 结算时间
18
-    public $addtime = 0;
18
+    public $addtime = null;  // 添加时间
19 19
 
20 20
     /**
21
-     * @return int
21
+     * @return mixed
22 22
      */
23
-    public function getId(): int
23
+    public function getId()
24 24
     {
25 25
         return $this->id;
26 26
     }
27 27
 
28 28
     /**
29
-     * @param int $id
29
+     * @param mixed $id
30 30
      * @return UserSignFenrunEntity
31 31
      */
32
-    public function setId(int $id): UserSignFenrunEntity
32
+    public function setId($id): UserSignFenrunEntity
33 33
     {
34 34
         $this->id = $id;
35 35
         return $this;
36 36
     }
37 37
 
38 38
     /**
39
-     * @return int
39
+     * @return mixed
40 40
      */
41
-    public function getUid(): int
41
+    public function getUid()
42 42
     {
43 43
         return $this->uid;
44 44
     }
45 45
 
46 46
     /**
47
-     * @param int $uid
47
+     * @param mixed $uid
48 48
      * @return UserSignFenrunEntity
49 49
      */
50
-    public function setUid(int $uid): UserSignFenrunEntity
50
+    public function setUid($uid): UserSignFenrunEntity
51 51
     {
52 52
         $this->uid = $uid;
53 53
         return $this;
54 54
     }
55 55
 
56 56
     /**
57
-     * @return float
57
+     * @return mixed
58 58
      */
59
-    public function getNumber(): float
59
+    public function getNumber()
60 60
     {
61 61
         return $this->number;
62 62
     }
63 63
 
64 64
     /**
65
-     * @param float $number
65
+     * @param mixed $number
66 66
      * @return UserSignFenrunEntity
67 67
      */
68
-    public function setNumber(float $number): UserSignFenrunEntity
68
+    public function setNumber($number): UserSignFenrunEntity
69 69
     {
70 70
         $this->number = $number;
71 71
         return $this;
72 72
     }
73 73
 
74 74
     /**
75
-     * @return int
75
+     * @return mixed
76 76
      */
77
-    public function getStatus(): int
77
+    public function getStatus()
78 78
     {
79 79
         return $this->status;
80 80
     }
81 81
 
82 82
     /**
83
-     * @param int $status
83
+     * @param mixed $status
84 84
      * @return UserSignFenrunEntity
85 85
      */
86
-    public function setStatus(int $status): UserSignFenrunEntity
86
+    public function setStatus($status): UserSignFenrunEntity
87 87
     {
88 88
         $this->status = $status;
89 89
         return $this;
90 90
     }
91 91
 
92 92
     /**
93
-     * @return string
93
+     * @return mixed
94 94
      */
95
-    public function getMark(): string
95
+    public function getMark()
96 96
     {
97 97
         return $this->mark;
98 98
     }
99 99
 
100 100
     /**
101
-     * @param string $mark
101
+     * @param mixed $mark
102 102
      * @return UserSignFenrunEntity
103 103
      */
104
-    public function setMark(string $mark): UserSignFenrunEntity
104
+    public function setMark($mark): UserSignFenrunEntity
105 105
     {
106 106
         $this->mark = $mark;
107 107
         return $this;
108 108
     }
109 109
 
110 110
     /**
111
-     * @return string
111
+     * @return mixed
112 112
      */
113
-    public function getDesc(): string
113
+    public function getDesc()
114 114
     {
115 115
         return $this->desc;
116 116
     }
117 117
 
118 118
     /**
119
-     * @param string $desc
119
+     * @param mixed $desc
120 120
      * @return UserSignFenrunEntity
121 121
      */
122
-    public function setDesc(string $desc): UserSignFenrunEntity
122
+    public function setDesc($desc): UserSignFenrunEntity
123 123
     {
124 124
         $this->desc = $desc;
125 125
         return $this;
126 126
     }
127 127
 
128 128
     /**
129
-     * @return string
129
+     * @return mixed
130 130
      */
131
-    public function getOrderId(): string
131
+    public function getOrderId()
132 132
     {
133 133
         return $this->orderId;
134 134
     }
135 135
 
136 136
     /**
137
-     * @param string $orderId
137
+     * @param mixed $orderId
138 138
      * @return UserSignFenrunEntity
139 139
      */
140
-    public function setOrderId(string $orderId): UserSignFenrunEntity
140
+    public function setOrderId($orderId): UserSignFenrunEntity
141 141
     {
142 142
         $this->orderId = $orderId;
143 143
         return $this;
144 144
     }
145 145
 
146 146
     /**
147
-     * @return string
147
+     * @return mixed
148 148
      */
149
-    public function getOrderType(): string
149
+    public function getOrderType()
150 150
     {
151 151
         return $this->orderType;
152 152
     }
153 153
 
154 154
     /**
155
-     * @param string $orderType
155
+     * @param mixed $orderType
156 156
      * @return UserSignFenrunEntity
157 157
      */
158
-    public function setOrderType(string $orderType): UserSignFenrunEntity
158
+    public function setOrderType($orderType): UserSignFenrunEntity
159 159
     {
160 160
         $this->orderType = $orderType;
161 161
         return $this;
@@ -180,20 +180,20 @@ class UserSignFenrunEntity extends DataEntity
180 180
     }
181 181
 
182 182
     /**
183
-     * @return int
183
+     * @return mixed
184 184
      */
185
-    public function getAddtime(): int
185
+    public function getAddtime()
186 186
     {
187 187
         return $this->addtime;
188 188
     }
189 189
 
190 190
     /**
191
-     * @param int $addtime
191
+     * @param mixed $addtime
192 192
      * @return UserSignFenrunEntity
193 193
      */
194
-    public function setAddtime(int $addtime): UserSignFenrunEntity
194
+    public function setAddtime($addtime): UserSignFenrunEntity
195 195
     {
196 196
         $this->addtime = $addtime;
197 197
         return $this;
198
-    }  // 添加时间
198
+    }
199 199
 }

+ 62 - 62
app/entity/data/user/UserSignFugouEntity.php

@@ -6,202 +6,202 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserSignFugouEntity extends DataEntity
8 8
 {
9
-    public $id = 0;  // 自增id
10
-    public $uid = 0;  // 会员id
11
-    public $number = 0.00;  // 赠送数量
12
-    public $status = 0;  // 复购金状态:1-有效 0-失效 -1待确认
13
-    public $mark = '';  // 备注
14
-    public $desc = '';  // 描述
15
-    public $orderId = '';  // 订单id
16
-    public $surplus = 0.00;  // 剩余
17
-    public $orderType = '';  // 订单类型。关联订单ID
18
-    public $commissionType = 0;  // 佣金类型:1代理费 2 消费佣金 3直推奖 4辖区佣金 5养老金 6广告费 7锁客收益 8平台奖励 9渠道商 10推广店铺收益 11合伙人分红 12联创分红 13股权分红
19
-    public $type = null;  // 复购金类型1赠送,2消耗
9
+    public $id = null;  // 自增id
10
+    public $uid = null;  // 会员id
11
+    public $number = null;  // 赠送数量
12
+    public $status = null;  // 复购金状态1-有效 0-失效 -1待确认
13
+    public $mark = null;  // 备注
14
+    public $desc = null;  // 描述
15
+    public $orderId = null;  // 订单id
16
+    public $surplus = null;  // 剩余
17
+    public $orderType = null;  // 订单类型。关联订单ID
18
+    public $commissionType = null;  // 佣金类型
19
+    public $type = null;  // 复购金类型 :1赠送,2消耗
20 20
     public $settlementTime = null;  // 结算时间
21
-    public $addtime = 0;  // 添加时间
21
+    public $addtime = null;  // 添加时间
22 22
 
23 23
     /**
24
-     * @return int
24
+     * @return mixed
25 25
      */
26
-    public function getId(): int
26
+    public function getId()
27 27
     {
28 28
         return $this->id;
29 29
     }
30 30
 
31 31
     /**
32
-     * @param int $id
32
+     * @param mixed $id
33 33
      * @return UserSignFugouEntity
34 34
      */
35
-    public function setId(int $id): UserSignFugouEntity
35
+    public function setId($id): UserSignFugouEntity
36 36
     {
37 37
         $this->id = $id;
38 38
         return $this;
39 39
     }
40 40
 
41 41
     /**
42
-     * @return int
42
+     * @return mixed
43 43
      */
44
-    public function getUid(): int
44
+    public function getUid()
45 45
     {
46 46
         return $this->uid;
47 47
     }
48 48
 
49 49
     /**
50
-     * @param int $uid
50
+     * @param mixed $uid
51 51
      * @return UserSignFugouEntity
52 52
      */
53
-    public function setUid(int $uid): UserSignFugouEntity
53
+    public function setUid($uid): UserSignFugouEntity
54 54
     {
55 55
         $this->uid = $uid;
56 56
         return $this;
57 57
     }
58 58
 
59 59
     /**
60
-     * @return float
60
+     * @return mixed
61 61
      */
62
-    public function getNumber(): float
62
+    public function getNumber()
63 63
     {
64 64
         return $this->number;
65 65
     }
66 66
 
67 67
     /**
68
-     * @param float $number
68
+     * @param mixed $number
69 69
      * @return UserSignFugouEntity
70 70
      */
71
-    public function setNumber(float $number): UserSignFugouEntity
71
+    public function setNumber($number): UserSignFugouEntity
72 72
     {
73 73
         $this->number = $number;
74 74
         return $this;
75 75
     }
76 76
 
77 77
     /**
78
-     * @return int
78
+     * @return mixed
79 79
      */
80
-    public function getStatus(): int
80
+    public function getStatus()
81 81
     {
82 82
         return $this->status;
83 83
     }
84 84
 
85 85
     /**
86
-     * @param int $status
86
+     * @param mixed $status
87 87
      * @return UserSignFugouEntity
88 88
      */
89
-    public function setStatus(int $status): UserSignFugouEntity
89
+    public function setStatus($status): UserSignFugouEntity
90 90
     {
91 91
         $this->status = $status;
92 92
         return $this;
93 93
     }
94 94
 
95 95
     /**
96
-     * @return string
96
+     * @return mixed
97 97
      */
98
-    public function getMark(): string
98
+    public function getMark()
99 99
     {
100 100
         return $this->mark;
101 101
     }
102 102
 
103 103
     /**
104
-     * @param string $mark
104
+     * @param mixed $mark
105 105
      * @return UserSignFugouEntity
106 106
      */
107
-    public function setMark(string $mark): UserSignFugouEntity
107
+    public function setMark($mark): UserSignFugouEntity
108 108
     {
109 109
         $this->mark = $mark;
110 110
         return $this;
111 111
     }
112 112
 
113 113
     /**
114
-     * @return string
114
+     * @return mixed
115 115
      */
116
-    public function getDesc(): string
116
+    public function getDesc()
117 117
     {
118 118
         return $this->desc;
119 119
     }
120 120
 
121 121
     /**
122
-     * @param string $desc
122
+     * @param mixed $desc
123 123
      * @return UserSignFugouEntity
124 124
      */
125
-    public function setDesc(string $desc): UserSignFugouEntity
125
+    public function setDesc($desc): UserSignFugouEntity
126 126
     {
127 127
         $this->desc = $desc;
128 128
         return $this;
129 129
     }
130 130
 
131 131
     /**
132
-     * @return string
132
+     * @return mixed
133 133
      */
134
-    public function getOrderId(): string
134
+    public function getOrderId()
135 135
     {
136 136
         return $this->orderId;
137 137
     }
138 138
 
139 139
     /**
140
-     * @param string $orderId
140
+     * @param mixed $orderId
141 141
      * @return UserSignFugouEntity
142 142
      */
143
-    public function setOrderId(string $orderId): UserSignFugouEntity
143
+    public function setOrderId($orderId): UserSignFugouEntity
144 144
     {
145 145
         $this->orderId = $orderId;
146 146
         return $this;
147 147
     }
148 148
 
149 149
     /**
150
-     * @return float
150
+     * @return mixed
151 151
      */
152
-    public function getSurplus(): float
152
+    public function getSurplus()
153 153
     {
154 154
         return $this->surplus;
155 155
     }
156 156
 
157 157
     /**
158
-     * @param float $surplus
158
+     * @param mixed $surplus
159 159
      * @return UserSignFugouEntity
160 160
      */
161
-    public function setSurplus(float $surplus): UserSignFugouEntity
161
+    public function setSurplus($surplus): UserSignFugouEntity
162 162
     {
163 163
         $this->surplus = $surplus;
164 164
         return $this;
165 165
     }
166 166
 
167 167
     /**
168
-     * @return string
168
+     * @return mixed
169 169
      */
170
-    public function getOrderType(): string
170
+    public function getOrderType()
171 171
     {
172 172
         return $this->orderType;
173 173
     }
174 174
 
175 175
     /**
176
-     * @param string $orderType
176
+     * @param mixed $orderType
177 177
      * @return UserSignFugouEntity
178 178
      */
179
-    public function setOrderType(string $orderType): UserSignFugouEntity
179
+    public function setOrderType($orderType): UserSignFugouEntity
180 180
     {
181 181
         $this->orderType = $orderType;
182 182
         return $this;
183 183
     }
184 184
 
185 185
     /**
186
-     * @return int
186
+     * @return mixed
187 187
      */
188
-    public function getCommissionType(): int
188
+    public function getCommissionType()
189 189
     {
190 190
         return $this->commissionType;
191 191
     }
192 192
 
193 193
     /**
194
-     * @param int $commissionType
194
+     * @param mixed $commissionType
195 195
      * @return UserSignFugouEntity
196 196
      */
197
-    public function setCommissionType(int $commissionType): UserSignFugouEntity
197
+    public function setCommissionType($commissionType): UserSignFugouEntity
198 198
     {
199 199
         $this->commissionType = $commissionType;
200 200
         return $this;
201 201
     }
202 202
 
203 203
     /**
204
-     * @return null
204
+     * @return mixed
205 205
      */
206 206
     public function getType()
207 207
     {
@@ -209,17 +209,17 @@ class UserSignFugouEntity extends DataEntity
209 209
     }
210 210
 
211 211
     /**
212
-     * @param null $type
212
+     * @param mixed $type
213 213
      * @return UserSignFugouEntity
214 214
      */
215
-    public function setType($type)
215
+    public function setType($type): UserSignFugouEntity
216 216
     {
217 217
         $this->type = $type;
218 218
         return $this;
219 219
     }
220 220
 
221 221
     /**
222
-     * @return null
222
+     * @return mixed
223 223
      */
224 224
     public function getSettlementTime()
225 225
     {
@@ -227,28 +227,28 @@ class UserSignFugouEntity extends DataEntity
227 227
     }
228 228
 
229 229
     /**
230
-     * @param null $settlementTime
230
+     * @param mixed $settlementTime
231 231
      * @return UserSignFugouEntity
232 232
      */
233
-    public function setSettlementTime($settlementTime)
233
+    public function setSettlementTime($settlementTime): UserSignFugouEntity
234 234
     {
235 235
         $this->settlementTime = $settlementTime;
236 236
         return $this;
237 237
     }
238 238
 
239 239
     /**
240
-     * @return int
240
+     * @return mixed
241 241
      */
242
-    public function getAddtime(): int
242
+    public function getAddtime()
243 243
     {
244 244
         return $this->addtime;
245 245
     }
246 246
 
247 247
     /**
248
-     * @param int $addtime
248
+     * @param mixed $addtime
249 249
      * @return UserSignFugouEntity
250 250
      */
251
-    public function setAddtime(int $addtime): UserSignFugouEntity
251
+    public function setAddtime($addtime): UserSignFugouEntity
252 252
     {
253 253
         $this->addtime = $addtime;
254 254
         return $this;

+ 63 - 63
app/entity/data/user/UserSignGongxianEntity.php

@@ -6,203 +6,203 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserSignGongxianEntity extends DataEntity
8 8
 {
9
-    public $id = 0;  // 自增id
10
-    public $uid = 0;  // 会员id
11
-    public $merId = 0;  // 商户id
12
-    public $number = 0.00;  // 赠送数量
13
-    public $status = 0;  // 贡献值状态: 1-有效 0-失效 -1待确认
14
-    public $mark = '';  // 备注
15
-    public $desc = '';  // 描述
16
-    public $orderId = '';  // 订单id
17
-    public $surplus = 0.00;  // 剩余
18
-    public $orderType = '';  // 订单类型
19
-    public $type = null;  // 贡献值类型: 1-赠送 2-消耗
9
+    public $id = null;  // 自增id
10
+    public $uid = null;  // 会员id
11
+    public $merId = null;  // 商户id
12
+    public $number = null;  // 赠送数量
13
+    public $status = null;  // 贡献值状态1-有效 0-失效 -1待确认
14
+    public $mark = null;  // 备注
15
+    public $desc = null;  // 描述
16
+    public $orderId = null;  // 订单id
17
+    public $surplus = null;  // 剩余
18
+    public $orderType = null;  // 订单类型。关联订单ID
19
+    public $type = null;  // 贡献值类型 :1赠送,2消耗
20 20
     public $settlementTime = null;  // 结算时间
21
-    public $addtime = 0;  // 添加时间
22
-    public $pv = 0.00;  // pv值
21
+    public $addtime = null;  // 添加时间
22
+    public $pv = null;  // pv值
23 23
 
24 24
     /**
25
-     * @return int
25
+     * @return mixed
26 26
      */
27
-    public function getId(): int
27
+    public function getId()
28 28
     {
29 29
         return $this->id;
30 30
     }
31 31
 
32 32
     /**
33
-     * @param int $id
33
+     * @param mixed $id
34 34
      * @return UserSignGongxianEntity
35 35
      */
36
-    public function setId(int $id): UserSignGongxianEntity
36
+    public function setId($id): UserSignGongxianEntity
37 37
     {
38 38
         $this->id = $id;
39 39
         return $this;
40 40
     }
41 41
 
42 42
     /**
43
-     * @return int
43
+     * @return mixed
44 44
      */
45
-    public function getUid(): int
45
+    public function getUid()
46 46
     {
47 47
         return $this->uid;
48 48
     }
49 49
 
50 50
     /**
51
-     * @param int $uid
51
+     * @param mixed $uid
52 52
      * @return UserSignGongxianEntity
53 53
      */
54
-    public function setUid(int $uid): UserSignGongxianEntity
54
+    public function setUid($uid): UserSignGongxianEntity
55 55
     {
56 56
         $this->uid = $uid;
57 57
         return $this;
58 58
     }
59 59
 
60 60
     /**
61
-     * @return int
61
+     * @return mixed
62 62
      */
63
-    public function getMerId(): int
63
+    public function getMerId()
64 64
     {
65 65
         return $this->merId;
66 66
     }
67 67
 
68 68
     /**
69
-     * @param int $merId
69
+     * @param mixed $merId
70 70
      * @return UserSignGongxianEntity
71 71
      */
72
-    public function setMerId(int $merId): UserSignGongxianEntity
72
+    public function setMerId($merId): UserSignGongxianEntity
73 73
     {
74 74
         $this->merId = $merId;
75 75
         return $this;
76 76
     }
77 77
 
78 78
     /**
79
-     * @return float
79
+     * @return mixed
80 80
      */
81
-    public function getNumber(): float
81
+    public function getNumber()
82 82
     {
83 83
         return $this->number;
84 84
     }
85 85
 
86 86
     /**
87
-     * @param float $number
87
+     * @param mixed $number
88 88
      * @return UserSignGongxianEntity
89 89
      */
90
-    public function setNumber(float $number): UserSignGongxianEntity
90
+    public function setNumber($number): UserSignGongxianEntity
91 91
     {
92 92
         $this->number = $number;
93 93
         return $this;
94 94
     }
95 95
 
96 96
     /**
97
-     * @return int
97
+     * @return mixed
98 98
      */
99
-    public function getStatus(): int
99
+    public function getStatus()
100 100
     {
101 101
         return $this->status;
102 102
     }
103 103
 
104 104
     /**
105
-     * @param int $status
105
+     * @param mixed $status
106 106
      * @return UserSignGongxianEntity
107 107
      */
108
-    public function setStatus(int $status): UserSignGongxianEntity
108
+    public function setStatus($status): UserSignGongxianEntity
109 109
     {
110 110
         $this->status = $status;
111 111
         return $this;
112 112
     }
113 113
 
114 114
     /**
115
-     * @return string
115
+     * @return mixed
116 116
      */
117
-    public function getMark(): string
117
+    public function getMark()
118 118
     {
119 119
         return $this->mark;
120 120
     }
121 121
 
122 122
     /**
123
-     * @param string $mark
123
+     * @param mixed $mark
124 124
      * @return UserSignGongxianEntity
125 125
      */
126
-    public function setMark(string $mark): UserSignGongxianEntity
126
+    public function setMark($mark): UserSignGongxianEntity
127 127
     {
128 128
         $this->mark = $mark;
129 129
         return $this;
130 130
     }
131 131
 
132 132
     /**
133
-     * @return string
133
+     * @return mixed
134 134
      */
135
-    public function getDesc(): string
135
+    public function getDesc()
136 136
     {
137 137
         return $this->desc;
138 138
     }
139 139
 
140 140
     /**
141
-     * @param string $desc
141
+     * @param mixed $desc
142 142
      * @return UserSignGongxianEntity
143 143
      */
144
-    public function setDesc(string $desc): UserSignGongxianEntity
144
+    public function setDesc($desc): UserSignGongxianEntity
145 145
     {
146 146
         $this->desc = $desc;
147 147
         return $this;
148 148
     }
149 149
 
150 150
     /**
151
-     * @return string
151
+     * @return mixed
152 152
      */
153
-    public function getOrderId(): string
153
+    public function getOrderId()
154 154
     {
155 155
         return $this->orderId;
156 156
     }
157 157
 
158 158
     /**
159
-     * @param string $orderId
159
+     * @param mixed $orderId
160 160
      * @return UserSignGongxianEntity
161 161
      */
162
-    public function setOrderId(string $orderId): UserSignGongxianEntity
162
+    public function setOrderId($orderId): UserSignGongxianEntity
163 163
     {
164 164
         $this->orderId = $orderId;
165 165
         return $this;
166 166
     }
167 167
 
168 168
     /**
169
-     * @return float
169
+     * @return mixed
170 170
      */
171
-    public function getSurplus(): float
171
+    public function getSurplus()
172 172
     {
173 173
         return $this->surplus;
174 174
     }
175 175
 
176 176
     /**
177
-     * @param float $surplus
177
+     * @param mixed $surplus
178 178
      * @return UserSignGongxianEntity
179 179
      */
180
-    public function setSurplus(float $surplus): UserSignGongxianEntity
180
+    public function setSurplus($surplus): UserSignGongxianEntity
181 181
     {
182 182
         $this->surplus = $surplus;
183 183
         return $this;
184 184
     }
185 185
 
186 186
     /**
187
-     * @return string
187
+     * @return mixed
188 188
      */
189
-    public function getOrderType(): string
189
+    public function getOrderType()
190 190
     {
191 191
         return $this->orderType;
192 192
     }
193 193
 
194 194
     /**
195
-     * @param string $orderType
195
+     * @param mixed $orderType
196 196
      * @return UserSignGongxianEntity
197 197
      */
198
-    public function setOrderType(string $orderType): UserSignGongxianEntity
198
+    public function setOrderType($orderType): UserSignGongxianEntity
199 199
     {
200 200
         $this->orderType = $orderType;
201 201
         return $this;
202 202
     }
203 203
 
204 204
     /**
205
-     * @return null
205
+     * @return mixed
206 206
      */
207 207
     public function getType()
208 208
     {
@@ -220,7 +220,7 @@ class UserSignGongxianEntity extends DataEntity
220 220
     }
221 221
 
222 222
     /**
223
-     * @return null
223
+     * @return mixed
224 224
      */
225 225
     public function getSettlementTime()
226 226
     {
@@ -238,36 +238,36 @@ class UserSignGongxianEntity extends DataEntity
238 238
     }
239 239
 
240 240
     /**
241
-     * @return int
241
+     * @return mixed
242 242
      */
243
-    public function getAddtime(): int
243
+    public function getAddtime()
244 244
     {
245 245
         return $this->addtime;
246 246
     }
247 247
 
248 248
     /**
249
-     * @param int $addtime
249
+     * @param mixed $addtime
250 250
      * @return UserSignGongxianEntity
251 251
      */
252
-    public function setAddtime(int $addtime): UserSignGongxianEntity
252
+    public function setAddtime($addtime): UserSignGongxianEntity
253 253
     {
254 254
         $this->addtime = $addtime;
255 255
         return $this;
256 256
     }
257 257
 
258 258
     /**
259
-     * @return float
259
+     * @return mixed
260 260
      */
261
-    public function getPv(): float
261
+    public function getPv()
262 262
     {
263 263
         return $this->pv;
264 264
     }
265 265
 
266 266
     /**
267
-     * @param float $pv
267
+     * @param mixed $pv
268 268
      * @return UserSignGongxianEntity
269 269
      */
270
-    public function setPv(float $pv): UserSignGongxianEntity
270
+    public function setPv($pv): UserSignGongxianEntity
271 271
     {
272 272
         $this->pv = $pv;
273 273
         return $this;

+ 57 - 57
app/entity/data/user/UserSignHongbaoEntity.php

@@ -6,183 +6,183 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserSignHongbaoEntity extends DataEntity
8 8
 {
9
-    public $id = 0;  // 自增id
10
-    public $uid = 0;  // 会员id
11
-    public $number = 0.00;  // 赠送数量
12
-    public $status = 0;  // 红包状态: 1-有效 0-失效 -1待确认
13
-    public $mark = '';  // 备注
14
-    public $desc = '';  // 描述
15
-    public $orderId = '';  // 订单id
16
-    public $surplus = 0.00;  // 剩余
17
-    public $orderType = '';  // 订单类型
18
-    public $type = null;  // 京豆类型: 1-消费赠送,2-消耗
9
+    public $id = null;  // 自增id
10
+    public $uid = null;  // 会员id
11
+    public $number = null;  // 赠送数量
12
+    public $status = null;  // 红包状态1-有效 0-失效 -1待确认
13
+    public $mark = null;  // 备注
14
+    public $desc = null;  // 描述
15
+    public $orderId = null;  // 订单id
16
+    public $surplus = null;  // 剩余
17
+    public $orderType = null;  // 订单类型。关联订单ID
18
+    public $type = null;  // 京豆类型 :1消费赠送,2消耗
19 19
     public $settlementTime = null;  // 结算时间
20
-    public $addtime = 0;  // 添加时间
20
+    public $addtime = null;  // 添加时间
21 21
 
22 22
     /**
23
-     * @return int
23
+     * @return mixed
24 24
      */
25
-    public function getId(): int
25
+    public function getId()
26 26
     {
27 27
         return $this->id;
28 28
     }
29 29
 
30 30
     /**
31
-     * @param int $id
31
+     * @param mixed $id
32 32
      * @return UserSignHongbaoEntity
33 33
      */
34
-    public function setId(int $id): UserSignHongbaoEntity
34
+    public function setId($id): UserSignHongbaoEntity
35 35
     {
36 36
         $this->id = $id;
37 37
         return $this;
38 38
     }
39 39
 
40 40
     /**
41
-     * @return int
41
+     * @return mixed
42 42
      */
43
-    public function getUid(): int
43
+    public function getUid()
44 44
     {
45 45
         return $this->uid;
46 46
     }
47 47
 
48 48
     /**
49
-     * @param int $uid
49
+     * @param mixed $uid
50 50
      * @return UserSignHongbaoEntity
51 51
      */
52
-    public function setUid(int $uid): UserSignHongbaoEntity
52
+    public function setUid($uid): UserSignHongbaoEntity
53 53
     {
54 54
         $this->uid = $uid;
55 55
         return $this;
56 56
     }
57 57
 
58 58
     /**
59
-     * @return float
59
+     * @return mixed
60 60
      */
61
-    public function getNumber(): float
61
+    public function getNumber()
62 62
     {
63 63
         return $this->number;
64 64
     }
65 65
 
66 66
     /**
67
-     * @param float $number
67
+     * @param mixed $number
68 68
      * @return UserSignHongbaoEntity
69 69
      */
70
-    public function setNumber(float $number): UserSignHongbaoEntity
70
+    public function setNumber($number): UserSignHongbaoEntity
71 71
     {
72 72
         $this->number = $number;
73 73
         return $this;
74 74
     }
75 75
 
76 76
     /**
77
-     * @return int
77
+     * @return mixed
78 78
      */
79
-    public function getStatus(): int
79
+    public function getStatus()
80 80
     {
81 81
         return $this->status;
82 82
     }
83 83
 
84 84
     /**
85
-     * @param int $status
85
+     * @param mixed $status
86 86
      * @return UserSignHongbaoEntity
87 87
      */
88
-    public function setStatus(int $status): UserSignHongbaoEntity
88
+    public function setStatus($status): UserSignHongbaoEntity
89 89
     {
90 90
         $this->status = $status;
91 91
         return $this;
92 92
     }
93 93
 
94 94
     /**
95
-     * @return string
95
+     * @return mixed
96 96
      */
97
-    public function getMark(): string
97
+    public function getMark()
98 98
     {
99 99
         return $this->mark;
100 100
     }
101 101
 
102 102
     /**
103
-     * @param string $mark
103
+     * @param mixed $mark
104 104
      * @return UserSignHongbaoEntity
105 105
      */
106
-    public function setMark(string $mark): UserSignHongbaoEntity
106
+    public function setMark($mark): UserSignHongbaoEntity
107 107
     {
108 108
         $this->mark = $mark;
109 109
         return $this;
110 110
     }
111 111
 
112 112
     /**
113
-     * @return string
113
+     * @return mixed
114 114
      */
115
-    public function getDesc(): string
115
+    public function getDesc()
116 116
     {
117 117
         return $this->desc;
118 118
     }
119 119
 
120 120
     /**
121
-     * @param string $desc
121
+     * @param mixed $desc
122 122
      * @return UserSignHongbaoEntity
123 123
      */
124
-    public function setDesc(string $desc): UserSignHongbaoEntity
124
+    public function setDesc($desc): UserSignHongbaoEntity
125 125
     {
126 126
         $this->desc = $desc;
127 127
         return $this;
128 128
     }
129 129
 
130 130
     /**
131
-     * @return string
131
+     * @return mixed
132 132
      */
133
-    public function getOrderId(): string
133
+    public function getOrderId()
134 134
     {
135 135
         return $this->orderId;
136 136
     }
137 137
 
138 138
     /**
139
-     * @param string $orderId
139
+     * @param mixed $orderId
140 140
      * @return UserSignHongbaoEntity
141 141
      */
142
-    public function setOrderId(string $orderId): UserSignHongbaoEntity
142
+    public function setOrderId($orderId): UserSignHongbaoEntity
143 143
     {
144 144
         $this->orderId = $orderId;
145 145
         return $this;
146 146
     }
147 147
 
148 148
     /**
149
-     * @return float
149
+     * @return mixed
150 150
      */
151
-    public function getSurplus(): float
151
+    public function getSurplus()
152 152
     {
153 153
         return $this->surplus;
154 154
     }
155 155
 
156 156
     /**
157
-     * @param float $surplus
157
+     * @param mixed $surplus
158 158
      * @return UserSignHongbaoEntity
159 159
      */
160
-    public function setSurplus(float $surplus): UserSignHongbaoEntity
160
+    public function setSurplus($surplus): UserSignHongbaoEntity
161 161
     {
162 162
         $this->surplus = $surplus;
163 163
         return $this;
164 164
     }
165 165
 
166 166
     /**
167
-     * @return string
167
+     * @return mixed
168 168
      */
169
-    public function getOrderType(): string
169
+    public function getOrderType()
170 170
     {
171 171
         return $this->orderType;
172 172
     }
173 173
 
174 174
     /**
175
-     * @param string $orderType
175
+     * @param mixed $orderType
176 176
      * @return UserSignHongbaoEntity
177 177
      */
178
-    public function setOrderType(string $orderType): UserSignHongbaoEntity
178
+    public function setOrderType($orderType): UserSignHongbaoEntity
179 179
     {
180 180
         $this->orderType = $orderType;
181 181
         return $this;
182 182
     }
183 183
 
184 184
     /**
185
-     * @return null
185
+     * @return mixed
186 186
      */
187 187
     public function getType()
188 188
     {
@@ -190,17 +190,17 @@ class UserSignHongbaoEntity extends DataEntity
190 190
     }
191 191
 
192 192
     /**
193
-     * @param null $type
193
+     * @param mixed $type
194 194
      * @return UserSignHongbaoEntity
195 195
      */
196
-    public function setType($type)
196
+    public function setType($type): UserSignHongbaoEntity
197 197
     {
198 198
         $this->type = $type;
199 199
         return $this;
200 200
     }
201 201
 
202 202
     /**
203
-     * @return null
203
+     * @return mixed
204 204
      */
205 205
     public function getSettlementTime()
206 206
     {
@@ -208,28 +208,28 @@ class UserSignHongbaoEntity extends DataEntity
208 208
     }
209 209
 
210 210
     /**
211
-     * @param null $settlementTime
211
+     * @param mixed $settlementTime
212 212
      * @return UserSignHongbaoEntity
213 213
      */
214
-    public function setSettlementTime($settlementTime)
214
+    public function setSettlementTime($settlementTime): UserSignHongbaoEntity
215 215
     {
216 216
         $this->settlementTime = $settlementTime;
217 217
         return $this;
218 218
     }
219 219
 
220 220
     /**
221
-     * @return int
221
+     * @return mixed
222 222
      */
223
-    public function getAddtime(): int
223
+    public function getAddtime()
224 224
     {
225 225
         return $this->addtime;
226 226
     }
227 227
 
228 228
     /**
229
-     * @param int $addtime
229
+     * @param mixed $addtime
230 230
      * @return UserSignHongbaoEntity
231 231
      */
232
-    public function setAddtime(int $addtime): UserSignHongbaoEntity
232
+    public function setAddtime($addtime): UserSignHongbaoEntity
233 233
     {
234 234
         $this->addtime = $addtime;
235 235
         return $this;

+ 62 - 62
app/entity/data/user/UserSignJingdouEntity.php

@@ -6,202 +6,202 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserSignJingdouEntity extends DataEntity
8 8
 {
9
-    public $id = 0;  // 自增id
10
-    public $uid = 0;  // 会员id
11
-    public $merId = 0;  // 商户id
12
-    public $number = 0.00;  // 赠送数量
13
-    public $status = 0;  // 京豆状态:1-有效 0-失效 -1待确认
14
-    public $mark = '';  // 备注
15
-    public $desc = '';  // 描述
16
-    public $orderId = '';  // 订单id
17
-    public $surplus = 0.00;  // 剩余
18
-    public $orderType = '';  // 订单类型。关联订单ID
19
-    public $type = null;  // 京豆类型1赠送,2消耗
9
+    public $id = null;  // 自增id
10
+    public $uid = null;  // 会员id
11
+    public $merId = null;  // 商户id
12
+    public $number = null;  // 赠送数量
13
+    public $status = null;  // 京豆状态1-有效 0-失效 -1待确认
14
+    public $mark = null;  // 备注
15
+    public $desc = null;  // 描述
16
+    public $orderId = null;  // 订单id
17
+    public $surplus = null;  // 剩余
18
+    public $orderType = null;  // 订单类型。关联订单ID
19
+    public $type = null;  // 京豆类型 :1赠送,2消耗
20 20
     public $settlementTime = null;  // 结算时间
21
-    public $addtime = 0;  // 添加时间
21
+    public $addtime = null;  // 添加时间
22 22
 
23 23
     /**
24
-     * @return int
24
+     * @return mixed
25 25
      */
26
-    public function getId(): int
26
+    public function getId()
27 27
     {
28 28
         return $this->id;
29 29
     }
30 30
 
31 31
     /**
32
-     * @param int $id
32
+     * @param mixed $id
33 33
      * @return UserSignJingdouEntity
34 34
      */
35
-    public function setId(int $id): UserSignJingdouEntity
35
+    public function setId($id): UserSignJingdouEntity
36 36
     {
37 37
         $this->id = $id;
38 38
         return $this;
39 39
     }
40 40
 
41 41
     /**
42
-     * @return int
42
+     * @return mixed
43 43
      */
44
-    public function getUid(): int
44
+    public function getUid()
45 45
     {
46 46
         return $this->uid;
47 47
     }
48 48
 
49 49
     /**
50
-     * @param int $uid
50
+     * @param mixed $uid
51 51
      * @return UserSignJingdouEntity
52 52
      */
53
-    public function setUid(int $uid): UserSignJingdouEntity
53
+    public function setUid($uid): UserSignJingdouEntity
54 54
     {
55 55
         $this->uid = $uid;
56 56
         return $this;
57 57
     }
58 58
 
59 59
     /**
60
-     * @return int
60
+     * @return mixed
61 61
      */
62
-    public function getMerId(): int
62
+    public function getMerId()
63 63
     {
64 64
         return $this->merId;
65 65
     }
66 66
 
67 67
     /**
68
-     * @param int $merId
68
+     * @param mixed $merId
69 69
      * @return UserSignJingdouEntity
70 70
      */
71
-    public function setMerId(int $merId): UserSignJingdouEntity
71
+    public function setMerId($merId): UserSignJingdouEntity
72 72
     {
73 73
         $this->merId = $merId;
74 74
         return $this;
75 75
     }
76 76
 
77 77
     /**
78
-     * @return float
78
+     * @return mixed
79 79
      */
80
-    public function getNumber(): float
80
+    public function getNumber()
81 81
     {
82 82
         return $this->number;
83 83
     }
84 84
 
85 85
     /**
86
-     * @param float $number
86
+     * @param mixed $number
87 87
      * @return UserSignJingdouEntity
88 88
      */
89
-    public function setNumber(float $number): UserSignJingdouEntity
89
+    public function setNumber($number): UserSignJingdouEntity
90 90
     {
91 91
         $this->number = $number;
92 92
         return $this;
93 93
     }
94 94
 
95 95
     /**
96
-     * @return int
96
+     * @return mixed
97 97
      */
98
-    public function getStatus(): int
98
+    public function getStatus()
99 99
     {
100 100
         return $this->status;
101 101
     }
102 102
 
103 103
     /**
104
-     * @param int $status
104
+     * @param mixed $status
105 105
      * @return UserSignJingdouEntity
106 106
      */
107
-    public function setStatus(int $status): UserSignJingdouEntity
107
+    public function setStatus($status): UserSignJingdouEntity
108 108
     {
109 109
         $this->status = $status;
110 110
         return $this;
111 111
     }
112 112
 
113 113
     /**
114
-     * @return string
114
+     * @return mixed
115 115
      */
116
-    public function getMark(): string
116
+    public function getMark()
117 117
     {
118 118
         return $this->mark;
119 119
     }
120 120
 
121 121
     /**
122
-     * @param string $mark
122
+     * @param mixed $mark
123 123
      * @return UserSignJingdouEntity
124 124
      */
125
-    public function setMark(string $mark): UserSignJingdouEntity
125
+    public function setMark($mark): UserSignJingdouEntity
126 126
     {
127 127
         $this->mark = $mark;
128 128
         return $this;
129 129
     }
130 130
 
131 131
     /**
132
-     * @return string
132
+     * @return mixed
133 133
      */
134
-    public function getDesc(): string
134
+    public function getDesc()
135 135
     {
136 136
         return $this->desc;
137 137
     }
138 138
 
139 139
     /**
140
-     * @param string $desc
140
+     * @param mixed $desc
141 141
      * @return UserSignJingdouEntity
142 142
      */
143
-    public function setDesc(string $desc): UserSignJingdouEntity
143
+    public function setDesc($desc): UserSignJingdouEntity
144 144
     {
145 145
         $this->desc = $desc;
146 146
         return $this;
147 147
     }
148 148
 
149 149
     /**
150
-     * @return string
150
+     * @return mixed
151 151
      */
152
-    public function getOrderId(): string
152
+    public function getOrderId()
153 153
     {
154 154
         return $this->orderId;
155 155
     }
156 156
 
157 157
     /**
158
-     * @param string $orderId
158
+     * @param mixed $orderId
159 159
      * @return UserSignJingdouEntity
160 160
      */
161
-    public function setOrderId(string $orderId): UserSignJingdouEntity
161
+    public function setOrderId($orderId): UserSignJingdouEntity
162 162
     {
163 163
         $this->orderId = $orderId;
164 164
         return $this;
165 165
     }
166 166
 
167 167
     /**
168
-     * @return float
168
+     * @return mixed
169 169
      */
170
-    public function getSurplus(): float
170
+    public function getSurplus()
171 171
     {
172 172
         return $this->surplus;
173 173
     }
174 174
 
175 175
     /**
176
-     * @param float $surplus
176
+     * @param mixed $surplus
177 177
      * @return UserSignJingdouEntity
178 178
      */
179
-    public function setSurplus(float $surplus): UserSignJingdouEntity
179
+    public function setSurplus($surplus): UserSignJingdouEntity
180 180
     {
181 181
         $this->surplus = $surplus;
182 182
         return $this;
183 183
     }
184 184
 
185 185
     /**
186
-     * @return string
186
+     * @return mixed
187 187
      */
188
-    public function getOrderType(): string
188
+    public function getOrderType()
189 189
     {
190 190
         return $this->orderType;
191 191
     }
192 192
 
193 193
     /**
194
-     * @param string $orderType
194
+     * @param mixed $orderType
195 195
      * @return UserSignJingdouEntity
196 196
      */
197
-    public function setOrderType(string $orderType): UserSignJingdouEntity
197
+    public function setOrderType($orderType): UserSignJingdouEntity
198 198
     {
199 199
         $this->orderType = $orderType;
200 200
         return $this;
201 201
     }
202 202
 
203 203
     /**
204
-     * @return null
204
+     * @return mixed
205 205
      */
206 206
     public function getType()
207 207
     {
@@ -209,17 +209,17 @@ class UserSignJingdouEntity extends DataEntity
209 209
     }
210 210
 
211 211
     /**
212
-     * @param null $type
212
+     * @param mixed $type
213 213
      * @return UserSignJingdouEntity
214 214
      */
215
-    public function setType($type)
215
+    public function setType($type): UserSignJingdouEntity
216 216
     {
217 217
         $this->type = $type;
218 218
         return $this;
219 219
     }
220 220
 
221 221
     /**
222
-     * @return null
222
+     * @return mixed
223 223
      */
224 224
     public function getSettlementTime()
225 225
     {
@@ -227,28 +227,28 @@ class UserSignJingdouEntity extends DataEntity
227 227
     }
228 228
 
229 229
     /**
230
-     * @param null $settlementTime
230
+     * @param mixed $settlementTime
231 231
      * @return UserSignJingdouEntity
232 232
      */
233
-    public function setSettlementTime($settlementTime)
233
+    public function setSettlementTime($settlementTime): UserSignJingdouEntity
234 234
     {
235 235
         $this->settlementTime = $settlementTime;
236 236
         return $this;
237 237
     }
238 238
 
239 239
     /**
240
-     * @return int
240
+     * @return mixed
241 241
      */
242
-    public function getAddtime(): int
242
+    public function getAddtime()
243 243
     {
244 244
         return $this->addtime;
245 245
     }
246 246
 
247 247
     /**
248
-     * @param int $addtime
248
+     * @param mixed $addtime
249 249
      * @return UserSignJingdouEntity
250 250
      */
251
-    public function setAddtime(int $addtime): UserSignJingdouEntity
251
+    public function setAddtime($addtime): UserSignJingdouEntity
252 252
     {
253 253
         $this->addtime = $addtime;
254 254
         return $this;

+ 6 - 6
app/entity/data/user/UserSignScoreEntity.php

@@ -9,7 +9,7 @@ class UserSignScoreEntity extends DataEntity
9 9
     public $id = null;  // 自增id
10 10
     public $uid = null;  // 会员id
11 11
     public $continuityDay = null;  // 连续签到几天
12
-    public $rewardScore = null;  // 赠送积分数量
12
+    public $rewardSocre = null;  // 赠送积分数量
13 13
     public $signinTime = null;  // 签到时间
14 14
     public $sourceUid = null;  // 赠送积分来源用户id
15 15
     public $status = null;  // 积分状态1-有效 0-失效 -1待确认
@@ -79,18 +79,18 @@ class UserSignScoreEntity extends DataEntity
79 79
     /**
80 80
      * @return mixed
81 81
      */
82
-    public function getRewardScore()
82
+    public function getRewardSocre()
83 83
     {
84
-        return $this->rewardScore;
84
+        return $this->rewardSocre;
85 85
     }
86 86
 
87 87
     /**
88
-     * @param mixed $rewardScore
88
+     * @param mixed $rewardSocre
89 89
      * @return UserSignScoreEntity
90 90
      */
91
-    public function setRewardScore($rewardScore): UserSignScoreEntity
91
+    public function setRewardSocre($rewardSocre): UserSignScoreEntity
92 92
     {
93
-        $this->rewardScore = $rewardScore;
93
+        $this->rewardSocre = $rewardSocre;
94 94
         return $this;
95 95
     }
96 96
 

+ 53 - 53
app/entity/data/user/UserSignVrEntity.php

@@ -6,182 +6,182 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserSignVrEntity extends DataEntity
8 8
 {
9
-    public $id = 0;  // 自增id
10
-    public $uid = 0;  // 会员id
11
-    public $number = 0.00;  // 赠送数量
12
-    public $mark = '';  // 备注
13
-    public $desc = '';  // 描述
14
-    public $orderId = '';  // 订单id
15
-    public $surplus = 0.00;  // 剩余
16
-    public $orderType = '';  // 订单类型,关联订单ID
17
-    public $type = 0;  // vr类型:1兑换,2消耗
9
+    public $id = null;  // 自增id
10
+    public $uid = null;  // 会员id
11
+    public $number = null;  // 赠送数量
12
+    public $mark = null;  // 备注
13
+    public $desc = null;  // 描述
14
+    public $orderId = null;  // 订单id
15
+    public $surplus = null;  // 剩余
16
+    public $orderType = null;  // 订单类型。关联订单ID
17
+    public $type = null;  // vr类型 :1兑换,2消耗
18 18
     public $settlementTime = null;  // 结算时间
19
-    public $addtime = 0;  // 添加时间
19
+    public $addtime = null;  // 添加时间
20 20
 
21 21
     /**
22
-     * @return int
22
+     * @return mixed
23 23
      */
24
-    public function getId(): int
24
+    public function getId()
25 25
     {
26 26
         return $this->id;
27 27
     }
28 28
 
29 29
     /**
30
-     * @param int $id
30
+     * @param mixed $id
31 31
      * @return UserSignVrEntity
32 32
      */
33
-    public function setId(int $id): UserSignVrEntity
33
+    public function setId($id): UserSignVrEntity
34 34
     {
35 35
         $this->id = $id;
36 36
         return $this;
37 37
     }
38 38
 
39 39
     /**
40
-     * @return int
40
+     * @return mixed
41 41
      */
42
-    public function getUid(): int
42
+    public function getUid()
43 43
     {
44 44
         return $this->uid;
45 45
     }
46 46
 
47 47
     /**
48
-     * @param int $uid
48
+     * @param mixed $uid
49 49
      * @return UserSignVrEntity
50 50
      */
51
-    public function setUid(int $uid): UserSignVrEntity
51
+    public function setUid($uid): UserSignVrEntity
52 52
     {
53 53
         $this->uid = $uid;
54 54
         return $this;
55 55
     }
56 56
 
57 57
     /**
58
-     * @return float
58
+     * @return mixed
59 59
      */
60
-    public function getNumber(): float
60
+    public function getNumber()
61 61
     {
62 62
         return $this->number;
63 63
     }
64 64
 
65 65
     /**
66
-     * @param float $number
66
+     * @param mixed $number
67 67
      * @return UserSignVrEntity
68 68
      */
69
-    public function setNumber(float $number): UserSignVrEntity
69
+    public function setNumber($number): UserSignVrEntity
70 70
     {
71 71
         $this->number = $number;
72 72
         return $this;
73 73
     }
74 74
 
75 75
     /**
76
-     * @return string
76
+     * @return mixed
77 77
      */
78
-    public function getMark(): string
78
+    public function getMark()
79 79
     {
80 80
         return $this->mark;
81 81
     }
82 82
 
83 83
     /**
84
-     * @param string $mark
84
+     * @param mixed $mark
85 85
      * @return UserSignVrEntity
86 86
      */
87
-    public function setMark(string $mark): UserSignVrEntity
87
+    public function setMark($mark): UserSignVrEntity
88 88
     {
89 89
         $this->mark = $mark;
90 90
         return $this;
91 91
     }
92 92
 
93 93
     /**
94
-     * @return string
94
+     * @return mixed
95 95
      */
96
-    public function getDesc(): string
96
+    public function getDesc()
97 97
     {
98 98
         return $this->desc;
99 99
     }
100 100
 
101 101
     /**
102
-     * @param string $desc
102
+     * @param mixed $desc
103 103
      * @return UserSignVrEntity
104 104
      */
105
-    public function setDesc(string $desc): UserSignVrEntity
105
+    public function setDesc($desc): UserSignVrEntity
106 106
     {
107 107
         $this->desc = $desc;
108 108
         return $this;
109 109
     }
110 110
 
111 111
     /**
112
-     * @return string
112
+     * @return mixed
113 113
      */
114
-    public function getOrderId(): string
114
+    public function getOrderId()
115 115
     {
116 116
         return $this->orderId;
117 117
     }
118 118
 
119 119
     /**
120
-     * @param string $orderId
120
+     * @param mixed $orderId
121 121
      * @return UserSignVrEntity
122 122
      */
123
-    public function setOrderId(string $orderId): UserSignVrEntity
123
+    public function setOrderId($orderId): UserSignVrEntity
124 124
     {
125 125
         $this->orderId = $orderId;
126 126
         return $this;
127 127
     }
128 128
 
129 129
     /**
130
-     * @return float
130
+     * @return mixed
131 131
      */
132
-    public function getSurplus(): float
132
+    public function getSurplus()
133 133
     {
134 134
         return $this->surplus;
135 135
     }
136 136
 
137 137
     /**
138
-     * @param float $surplus
138
+     * @param mixed $surplus
139 139
      * @return UserSignVrEntity
140 140
      */
141
-    public function setSurplus(float $surplus): UserSignVrEntity
141
+    public function setSurplus($surplus): UserSignVrEntity
142 142
     {
143 143
         $this->surplus = $surplus;
144 144
         return $this;
145 145
     }
146 146
 
147 147
     /**
148
-     * @return string
148
+     * @return mixed
149 149
      */
150
-    public function getOrderType(): string
150
+    public function getOrderType()
151 151
     {
152 152
         return $this->orderType;
153 153
     }
154 154
 
155 155
     /**
156
-     * @param string $orderType
156
+     * @param mixed $orderType
157 157
      * @return UserSignVrEntity
158 158
      */
159
-    public function setOrderType(string $orderType): UserSignVrEntity
159
+    public function setOrderType($orderType): UserSignVrEntity
160 160
     {
161 161
         $this->orderType = $orderType;
162 162
         return $this;
163 163
     }
164 164
 
165 165
     /**
166
-     * @return int
166
+     * @return mixed
167 167
      */
168
-    public function getType(): int
168
+    public function getType()
169 169
     {
170 170
         return $this->type;
171 171
     }
172 172
 
173 173
     /**
174
-     * @param int $type
174
+     * @param mixed $type
175 175
      * @return UserSignVrEntity
176 176
      */
177
-    public function setType(int $type): UserSignVrEntity
177
+    public function setType($type): UserSignVrEntity
178 178
     {
179 179
         $this->type = $type;
180 180
         return $this;
181 181
     }
182 182
 
183 183
     /**
184
-     * @return null
184
+     * @return mixed
185 185
      */
186 186
     public function getSettlementTime()
187 187
     {
@@ -189,28 +189,28 @@ class UserSignVrEntity extends DataEntity
189 189
     }
190 190
 
191 191
     /**
192
-     * @param null $settlementTime
192
+     * @param mixed $settlementTime
193 193
      * @return UserSignVrEntity
194 194
      */
195
-    public function setSettlementTime($settlementTime)
195
+    public function setSettlementTime($settlementTime): UserSignVrEntity
196 196
     {
197 197
         $this->settlementTime = $settlementTime;
198 198
         return $this;
199 199
     }
200 200
 
201 201
     /**
202
-     * @return int
202
+     * @return mixed
203 203
      */
204
-    public function getAddtime(): int
204
+    public function getAddtime()
205 205
     {
206 206
         return $this->addtime;
207 207
     }
208 208
 
209 209
     /**
210
-     * @param int $addtime
210
+     * @param mixed $addtime
211 211
      * @return UserSignVrEntity
212 212
      */
213
-    public function setAddtime(int $addtime): UserSignVrEntity
213
+    public function setAddtime($addtime): UserSignVrEntity
214 214
     {
215 215
         $this->addtime = $addtime;
216 216
         return $this;