Преглед изворни кода

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

sunxbiao пре 11 месеци
родитељ
комит
06e6b94083
34 измењених фајлова са 4466 додато и 3770 уклоњено
  1. 7 7
      app/common/dao/product/SeckillDao.php
  2. 16 0
      app/common/dao/store/order/StoreCartDao.php
  3. 21 2
      app/common/dao/store/order/StoreGroupOrderDao.php
  4. 15 10
      app/common/dao/store/product/ProductAttrValueDao.php
  5. 16 11
      app/common/dao/store/product/ProductDao.php
  6. 26 0
      app/common/dao/system/merchant/MerchantDao.php
  7. 75 0
      app/common/dao/user/UserPvLogDao.php
  8. 75 0
      app/common/dao/user/UserSignHongbaoDao.php
  9. 2 0
      app/common/enum/merchant/MerchantEnum.php
  10. 2 0
      app/common/enum/store/ProductEnum.php
  11. 1 1
      app/common/model/product/SeckillModel.php
  12. 26 0
      app/common/repositories/product/ProductSeckillRepository.php
  13. 0 26
      app/common/repositories/product/SeckillRepository.php
  14. 13 0
      app/common/repositories/store/order/StoreCartRepository.php
  15. 35 6
      app/common/repositories/store/order/StoreGroupOrderRepository.php
  16. 888 805
      app/common/repositories/store/order/StoreOrderRepository.php
  17. 20 6
      app/common/repositories/store/product/ProductAttrValueRepository.php
  18. 20 6
      app/common/repositories/store/product/ProductRepository.php
  19. 17 3
      app/common/repositories/system/merchant/MerchantRepository.php
  20. 135 0
      app/common/repositories/user/UserPvLogRepository.php
  21. 14 18
      app/common/repositories/user/UserSignGongxianRepository.php
  22. 142 0
      app/common/repositories/user/UserSignHongbaoRepository.php
  23. 9 348
      app/controller/api/store/order/StoreOrder.php
  24. 457 457
      app/entity/data/merchant/MerchantEntity.php
  25. 123 0
      app/entity/data/product/ProductSeckillEntity.php
  26. 0 95
      app/entity/data/product/SeckillEntity.php
  27. 0 522
      app/entity/data/store/ProductAttrValueEntity.php
  28. 0 865
      app/entity/data/store/ProductEntity.php
  29. 115 114
      app/entity/data/store/StoreGroupOrderEntity.php
  30. 418 418
      app/entity/data/store/StoreOrderEntity.php
  31. 522 0
      app/entity/data/store/StoreProductAttrValueEntity.php
  32. 1187 0
      app/entity/data/store/StoreProductEntity.php
  33. 50 50
      app/entity/data/user/UserPvLogEntity.php
  34. 19 0
      app/entity/request/api/store/order/StoreOrderCreateRequestEntity.php

+ 7 - 7
app/common/dao/product/SeckillDao.php

@@ -4,18 +4,18 @@ namespace app\common\dao\product;
4 4
 
5 5
 use app\common\dao\BaseDao;
6 6
 use app\common\enum\product\SeckillEnum;
7
-use app\common\model\product\SeckillModel;
7
+use app\common\model\product\ProductSeckillModel;
8 8
 use app\entity\CommonEntity;
9
-use app\entity\data\product\SeckillEntity;
9
+use app\entity\data\product\ProductSeckillEntity;
10 10
 
11
-class SeckillDao extends BaseDao
11
+class ProductSeckillDao extends BaseDao
12 12
 {
13 13
     /**
14 14
      * @return string
15 15
      */
16 16
     protected function getModel(): string
17 17
     {
18
-        return SeckillModel::class;
18
+        return ProductSeckillModel::class;
19 19
     }
20 20
 
21 21
     /**
@@ -23,11 +23,11 @@ class SeckillDao extends BaseDao
23 23
      * @param int $productId
24 24
      * @return CommonEntity
25 25
      */
26
-    public function getSeckillEntityByProductId(int $productId): CommonEntity
26
+    public function getProductSeckillEntityByProductId(int $productId): CommonEntity
27 27
     {
28 28
         $data = [];
29 29
         try {
30
-            /** @var SeckillModel $model */
30
+            /** @var ProductSeckillModel $model */
31 31
             $model = $this->getModel();
32 32
             $dataRes = $model::getDB()
33 33
                 ->where('product_id', '=', $productId)
@@ -40,6 +40,6 @@ class SeckillDao extends BaseDao
40 40
         } catch (\Exception $e) {
41 41
 
42 42
         }
43
-        return SeckillEntity::newInstance($data);
43
+        return ProductSeckillEntity::newInstance($data);
44 44
     }
45 45
 }

+ 16 - 0
app/common/dao/store/order/StoreCartDao.php

@@ -12,6 +12,7 @@ namespace app\common\dao\store\order;
12 12
 
13 13
 
14 14
 use app\common\dao\BaseDao;
15
+use app\common\enum\store\CartEnum;
15 16
 use app\common\model\BaseModel;
16 17
 use app\common\model\store\order\StoreCart;
17 18
 use app\entity\CommonEntity;
@@ -202,4 +203,19 @@ class StoreCartDao extends BaseDao
202 203
         }
203 204
         return $entityList;
204 205
     }
206
+
207
+    /**
208
+     * @param array $cartIdList
209
+     * @param int $isPay
210
+     * @return int
211
+     * @throws DbException
212
+     */
213
+    public function updateIsPayByCartIdList(array $cartIdList, int $isPay = CartEnum::IS_PAY['Yes']['code']): int
214
+    {
215
+        /** @var StoreCart $model */
216
+        $model = $this->getModel();
217
+        return $model::getDB()
218
+            ->whereIn('cart_id', $cartIdList)
219
+            ->update(['is_pay' => $isPay]);
220
+    }
205 221
 }

+ 21 - 2
app/common/dao/store/order/StoreGroupOrderDao.php

@@ -5,16 +5,18 @@
5 5
  * @author xaboy
6 6
  * @day 2020/6/8
7 7
  *
8
- * 
8
+ *
9 9
  */
10 10
 
11 11
 namespace app\common\dao\store\order;
12 12
 
13 13
 
14 14
 use app\common\dao\BaseDao;
15
+use app\common\enum\store\StoreGroupOrderEnum;
15 16
 use app\common\model\store\order\StoreGroupOrder;
16 17
 use app\entity\CommonEntity;
17 18
 use app\entity\data\store\StoreGroupOrderEntity;
19
+use think\db\exception\DbException;
18 20
 
19 21
 /**
20 22
  * Class StoreGroupOrderDao
@@ -45,7 +47,7 @@ class StoreGroupOrderDao extends BaseDao
45 47
     {
46 48
         return StoreGroupOrder::when($uid, function ($query, $uid) {
47 49
             $query->where('uid', $uid);
48
-        })->where('is_del', 0)->where('test_order',0)->where('paid', 0)->count();
50
+        })->where('is_del', 0)->where('test_order', 0)->where('paid', 0)->count();
49 51
     }
50 52
 
51 53
     /**
@@ -116,4 +118,21 @@ class StoreGroupOrderDao extends BaseDao
116 118
         }
117 119
         return $entityList;
118 120
     }
121
+
122
+    /**
123
+     * @param $groupOrderId
124
+     * @return int
125
+     * @throws DbException
126
+     */
127
+    public function paySuccess($groupOrderId): int
128
+    {
129
+        /** @var StoreGroupOrder $model */
130
+        $model = $this->getModel();
131
+        return $model::getDB()
132
+            ->where('group_order_id', '=', $groupOrderId)
133
+            ->update([
134
+                'paid' => StoreGroupOrderEnum::PAID['YES']['code'],
135
+                'pay_time' => date('Y-m-d H:i:s')
136
+            ]);
137
+    }
119 138
 }

+ 15 - 10
app/common/dao/store/product/ProductAttrValueDao.php

@@ -9,7 +9,8 @@ namespace app\common\dao\store\product;
9 9
 
10 10
 use app\common\dao\BaseDao;
11 11
 use app\common\model\store\product\ProductAttrValue as model;
12
-use app\entity\data\store\ProductAttrValueEntity;
12
+use app\entity\CommonEntity;
13
+use app\entity\data\store\StoreProductAttrValueEntity;
13 14
 use think\facade\Db;
14 15
 
15 16
 /**
@@ -259,23 +260,27 @@ class ProductAttrValueDao extends BaseDao
259 260
     }
260 261
 
261 262
     /**
262
-     * @param string $unique
263
-     * @return \app\entity\CommonEntity
263
+     * @param array $uniqueList
264
+     * @return CommonEntity[]
264 265
      */
265
-    public function getProductAttrValueEntityByUnique(string $unique): \app\entity\CommonEntity
266
+    public function getStoreProductAttrValueEntityListByUniqueList(array $uniqueList): array
266 267
     {
267
-        $data = [];
268
+        $entityList = [];
268 269
         try {
269 270
             /** @var model $model */
270 271
             $model = $this->getModel();
271
-            $dataRes = $model::getDb()
272
-                ->where('unique', '=', $unique)
273
-                ->find();
272
+            $dataRes = $model::getDB()
273
+                ->whereIn('unique', $uniqueList)
274
+                ->select()
275
+                ->toArray();
274 276
             if (!empty($dataRes)) {
275
-                $data = $dataRes->toArray();
277
+                $entityList = array_map(function ($data) {
278
+                    return StoreProductAttrValueEntity::newInstance($data);
279
+                }, $dataRes);
276 280
             }
277 281
         } catch (\Exception $e) {
282
+
278 283
         }
279
-        return ProductAttrValueEntity::newInstance($data);
284
+        return $entityList;
280 285
     }
281 286
 }

+ 16 - 11
app/common/dao/store/product/ProductDao.php

@@ -11,7 +11,8 @@ use app\common\dao\BaseDao;
11 11
 use app\common\enum\store\ProductEnum;
12 12
 use app\common\model\store\product\Product as model;
13 13
 use app\common\repositories\store\StoreCategoryRepository;
14
-use app\entity\data\store\ProductEntity;
14
+use app\entity\CommonEntity;
15
+use app\entity\data\store\StoreProductEntity;
15 16
 use think\Exception;
16 17
 use think\facade\Db;
17 18
 
@@ -439,28 +440,32 @@ class ProductDao extends BaseDao
439 440
     }
440 441
 
441 442
     /**
442
-     * @param int $productId
443
-     * @return \app\entity\CommonEntity
443
+     * @param array $idList
444
+     * @return CommonEntity[]
444 445
      */
445
-    public function getProductEntityByProductId(int $productId): \app\entity\CommonEntity
446
+    public function getUserSignGongxianEntityListByIdList(array $idList): array
446 447
     {
447
-        $productData = [];
448
+        $entityList = [];
448 449
         try {
449 450
             /** @var model $model */
450 451
             $model = $this->getModel();
451
-            $productDataRes = $model::getDb()
452
-                ->where('product_id', '=', $productId)
452
+            $dataRes = $model::getDB()
453
+                ->whereIn('product_id', $idList)
453 454
                 ->where('is_del', '=', ProductEnum::IS_DEL['No']['code'])
454 455
                 ->where('status', '=', ProductEnum::STATUS['Approved']['code'])
455 456
                 ->where('is_used', '=', ProductEnum::IS_USED['Yes']['code'])
456 457
                 ->where('is_show', '=', ProductEnum::IS_SHOW['Yes']['code'])
457 458
                 ->where('mer_status', '=', ProductEnum::MER_STATUS['Yes']['code'])
458
-                ->find();
459
-            if (!empty($productDataRes)) {
460
-                $productData = $productDataRes->toArray();
459
+                ->select()
460
+                ->toArray();
461
+            if (!empty($dataRes)) {
462
+                $entityList = array_map(function ($data) {
463
+                    return StoreProductEntity::newInstance($data);
464
+                }, $dataRes);
461 465
             }
462 466
         } catch (\Exception $e) {
467
+
463 468
         }
464
-        return ProductEntity::newInstance($productData);
469
+        return $entityList;
465 470
     }
466 471
 }

+ 26 - 0
app/common/dao/system/merchant/MerchantDao.php

@@ -15,6 +15,7 @@ use app\common\dao\BaseDao;
15 15
 use app\common\enum\merchant\MerchantEnum;
16 16
 use app\common\model\system\merchant\Merchant;
17 17
 use app\common\model\user\User;
18
+use app\entity\CommonEntity;
18 19
 use app\entity\data\merchant\MerchantEntity;
19 20
 use think\db\BaseQuery;
20 21
 use think\db\exception\DataNotFoundException;
@@ -252,4 +253,29 @@ class MerchantDao extends BaseDao
252 253
         return MerchantEntity::newInstance($data);
253 254
     }
254 255
 
256
+    /**
257
+     * @param array $idList
258
+     * @return CommonEntity[]
259
+     */
260
+    public function getMerchantEntityListByMerchantIdList(array $idList): array
261
+    {
262
+        $entityList = [];
263
+        try {
264
+            /** @var Merchant $model */
265
+            $model = $this->getModel();
266
+            $dataRes = $model::getDB()
267
+                ->whereIn('mer_id', $idList)
268
+                ->where('is_del', '=', MerchantEnum::IS_DEL['No']['code'])
269
+                ->select()
270
+                ->toArray();
271
+            if (!empty($dataRes)) {
272
+                $entityList = array_map(function ($data) {
273
+                    return MerchantEntity::newInstance($data);
274
+                }, $dataRes);
275
+            }
276
+        } catch (\Exception $e) {
277
+
278
+        }
279
+        return $entityList;
280
+    }
255 281
 }

+ 75 - 0
app/common/dao/user/UserPvLogDao.php

@@ -3,12 +3,87 @@
3 3
 namespace app\common\dao\user;
4 4
 
5 5
 use app\common\dao\BaseDao;
6
+use app\common\enum\user\UserPvLogEnum;
7
+use app\common\model\BaseModel;
6 8
 use app\common\model\user\UserPvLog;
9
+use app\entity\CommonEntity;
10
+use app\entity\data\user\UserPvLogEntity;
11
+use think\db\exception\DataNotFoundException;
12
+use think\db\exception\DbException;
13
+use think\db\exception\ModelNotFoundException;
7 14
 
8 15
 class UserPvLogDao extends BaseDao
9 16
 {
17
+    /**
18
+     * @return BaseModel
19
+     */
10 20
     protected function getModel(): string
11 21
     {
12 22
         return UserPvLog::class;
13 23
     }
24
+
25
+    /**
26
+     * @param array $idList
27
+     * @return CommonEntity[]
28
+     */
29
+    public function getUserPvLogEntityListByIdList(array $idList): array
30
+    {
31
+        $entityList = [];
32
+        try {
33
+            /** @var UserPvLog $model */
34
+            $model = $this->getModel();
35
+            $dataRes = $model::getDB()
36
+                ->whereIn('id', $idList)
37
+                ->select()
38
+                ->toArray();
39
+            if (!empty($dataRes)) {
40
+                $entityList = array_map(function ($data) {
41
+                    return UserPvLogEntity::newInstance($data);
42
+                }, $dataRes);
43
+            }
44
+        } catch (\Exception $e) {
45
+
46
+        }
47
+        return $entityList;
48
+    }
49
+
50
+    /**
51
+     * @param string $orderType
52
+     * @param array $orderIdList
53
+     * @return UserPvLogEntity[]
54
+     */
55
+    public function getUserPvLogEntityListByOrderIdListAndPending(string $orderType, array $orderIdList): array
56
+    {
57
+        $entityList = [];
58
+        try {
59
+            $dataList = UserPvLog::getDB()
60
+                ->where('order_type', '=', $orderType)
61
+                ->whereIn('order_id', $orderIdList)
62
+                ->where('status', '=', UserPvLogEnum::STATUS['PendingConfirmation']['code'])
63
+                ->select()
64
+                ->toArray();
65
+            if (!empty($dataList)) {
66
+                $entityList = array_map(function ($data) {
67
+                    return UserPvLogEntity::newInstance($data);
68
+                }, $dataList);
69
+            }
70
+        } catch (DataNotFoundException|ModelNotFoundException|DbException $e) {
71
+
72
+        }
73
+        return $entityList;
74
+    }
75
+
76
+    /**
77
+     * 批量更新
78
+     * @param $dataList
79
+     * @return array
80
+     */
81
+    public function saveAll($dataList): array
82
+    {
83
+        try {
84
+            return $this->getModel()->saveAll($dataList)->toArray();
85
+        } catch (\Exception $e) {
86
+            return [];
87
+        }
88
+    }
14 89
 }

+ 75 - 0
app/common/dao/user/UserSignHongbaoDao.php

@@ -3,12 +3,87 @@
3 3
 namespace app\common\dao\user;
4 4
 
5 5
 use app\common\dao\BaseDao;
6
+use app\common\enum\user\UserSignHongbaoEnum;
7
+use app\common\model\BaseModel;
6 8
 use app\common\model\user\UserSignHongbao;
9
+use app\entity\CommonEntity;
10
+use app\entity\data\user\UserSignHongbaoEntity;
11
+use think\db\exception\DataNotFoundException;
12
+use think\db\exception\DbException;
13
+use think\db\exception\ModelNotFoundException;
7 14
 
8 15
 class UserSignHongbaoDao extends BaseDao
9 16
 {
17
+    /**
18
+     * @return BaseModel
19
+     */
10 20
     protected function getModel(): string
11 21
     {
12 22
         return UserSignHongbao::class;
13 23
     }
24
+
25
+    /**
26
+     * @param array $idList
27
+     * @return CommonEntity[]
28
+     */
29
+    public function getUserSignHongbaoEntityListByIdList(array $idList): array
30
+    {
31
+        $entityList = [];
32
+        try {
33
+            /** @var UserSignHongbao $model */
34
+            $model = $this->getModel();
35
+            $dataRes = $model::getDB()
36
+                ->whereIn('id', $idList)
37
+                ->select()
38
+                ->toArray();
39
+            if (!empty($dataRes)) {
40
+                $entityList = array_map(function ($data) {
41
+                    return UserSignHongbaoEntity::newInstance($data);
42
+                }, $dataRes);
43
+            }
44
+        } catch (\Exception $e) {
45
+
46
+        }
47
+        return $entityList;
48
+    }
49
+
50
+    /**
51
+     * @param string $orderType
52
+     * @param array $orderIdList
53
+     * @return UserSignHongbaoEntity[]
54
+     */
55
+    public function getUserSignHongbaoEntityListByOrderIdListAndPending(string $orderType, array $orderIdList): array
56
+    {
57
+        $entityList = [];
58
+        try {
59
+            $dataList = UserSignHongbao::getDB()
60
+                ->where('order_type', '=', $orderType)
61
+                ->whereIn('order_id', $orderIdList)
62
+                ->where('status', '=', UserSignHongbaoEnum::STATUS['PendingConfirmation']['code'])
63
+                ->select()
64
+                ->toArray();
65
+            if (!empty($dataList)) {
66
+                $entityList = array_map(function ($data) {
67
+                    return UserSignHongbaoEntity::newInstance($data);
68
+                }, $dataList);
69
+            }
70
+        } catch (DataNotFoundException|ModelNotFoundException|DbException $e) {
71
+
72
+        }
73
+        return $entityList;
74
+    }
75
+
76
+    /**
77
+     * 批量更新
78
+     * @param $dataList
79
+     * @return array
80
+     */
81
+    public function saveAll($dataList): array
82
+    {
83
+        try {
84
+            return $this->getModel()->saveAll($dataList)->toArray();
85
+        } catch (\Exception $e) {
86
+            return [];
87
+        }
88
+    }
14 89
 }

+ 2 - 0
app/common/enum/merchant/MerchantEnum.php

@@ -6,6 +6,8 @@ use app\common\enum\CommonEnum;
6 6
 
7 7
 class MerchantEnum extends CommonEnum
8 8
 {
9
+    const IS_DEL = parent::IS_DEL;
10
+
9 11
     // 商户类型
10 12
     const MER_TYPE = [
11 13
         'Normal' => ['code' => 0, 'name' => '普通商户'],

+ 2 - 0
app/common/enum/store/ProductEnum.php

@@ -6,6 +6,8 @@ use app\common\enum\CommonEnum;
6 6
 
7 7
 class ProductEnum extends CommonEnum
8 8
 {
9
+    const IS_DEL = parent::IS_DEL;
10
+
9 11
     const STATUS = [
10 12
         'Pending' => ['code' => 0, 'name' => '审核中'],
11 13
         'Approved' => ['code' => 1, 'name' => '审核通过'],

+ 1 - 1
app/common/model/product/SeckillModel.php

@@ -4,7 +4,7 @@ namespace app\common\model\product;
4 4
 
5 5
 use app\common\model\BaseModel;
6 6
 
7
-class SeckillModel extends BaseModel
7
+class ProductSeckillModel extends BaseModel
8 8
 {
9 9
 
10 10
     public static function tablePk(): ?string

+ 26 - 0
app/common/repositories/product/ProductSeckillRepository.php

@@ -0,0 +1,26 @@
1
+<?php
2
+
3
+namespace app\common\repositories\product;
4
+
5
+use app\common\dao\product\ProductSeckillDao;
6
+use app\common\repositories\BaseRepository;
7
+use app\entity\data\product\ProductSeckillEntity;
8
+
9
+class ProductSeckillRepository extends BaseRepository
10
+{
11
+    public function __construct(ProductSeckillDao $dao)
12
+    {
13
+        $this->dao = $dao;
14
+    }
15
+
16
+    /**
17
+     * @param int $productId
18
+     * @return ProductSeckillEntity
19
+     */
20
+    public function getProductSeckillEntityByProductId(int $productId): ProductSeckillEntity
21
+    {
22
+        /** @var ProductSeckillEntity $entity */
23
+        $entity = $this->dao->getProductSeckillEntityByProductId($productId);
24
+        return $entity;
25
+    }
26
+}

+ 0 - 26
app/common/repositories/product/SeckillRepository.php

@@ -1,26 +0,0 @@
1
-<?php
2
-
3
-namespace app\common\repositories\product;
4
-
5
-use app\common\dao\product\SeckillDao;
6
-use app\common\repositories\BaseRepository;
7
-use app\entity\data\product\SeckillEntity;
8
-
9
-class SeckillRepository extends BaseRepository
10
-{
11
-    public function __construct(SeckillDao $dao)
12
-    {
13
-        $this->dao = $dao;
14
-    }
15
-
16
-    /**
17
-     * @param int $productId
18
-     * @return SeckillEntity
19
-     */
20
-    public function getSeckillEntityByProductId(int $productId): SeckillEntity
21
-    {
22
-        /** @var SeckillEntity $entity */
23
-        $entity = $this->dao->getSeckillEntityByProductId($productId);
24
-        return $entity;
25
-    }
26
-}

+ 13 - 0
app/common/repositories/store/order/StoreCartRepository.php

@@ -12,11 +12,13 @@ namespace app\common\repositories\store\order;
12 12
 
13 13
 
14 14
 use app\common\dao\store\order\StoreCartDao;
15
+use app\common\enum\store\CartEnum;
15 16
 use app\common\repositories\BaseRepository;
16 17
 use app\common\repositories\store\coupon\StoreCouponProductRepository;
17 18
 use app\common\repositories\store\coupon\StoreCouponRepository;
18 19
 use app\common\repositories\store\product\ProductRepository;
19 20
 use app\entity\data\store\CartEntity;
21
+use think\db\exception\DbException;
20 22
 use think\facade\Db;
21 23
 
22 24
 /**
@@ -143,4 +145,15 @@ class StoreCartRepository extends BaseRepository
143 145
     {
144 146
         return $this->dao->getCartEntityListByCartIdList($cartIdList);
145 147
     }
148
+
149
+    /**
150
+     * @param array $cartIdList
151
+     * @param int $isPay
152
+     * @return int
153
+     * @throws DbException
154
+     */
155
+    public function updateIsPayByCartIdList(array $cartIdList, int $isPay = CartEnum::IS_PAY['Yes']['code']): int
156
+    {
157
+        return $this->dao->updateIsPayByCartIdList($cartIdList, $isPay);
158
+    }
146 159
 }

+ 35 - 6
app/common/repositories/store/order/StoreGroupOrderRepository.php

@@ -16,6 +16,7 @@ use app\common\repositories\BaseRepository;
16 16
 use app\common\repositories\store\coupon\StoreCouponUserRepository;
17 17
 use app\entity\data\store\StoreGroupOrderEntity;
18 18
 use crmeb\jobs\CancelGroupOrderJob;
19
+use think\db\exception\DbException;
19 20
 use think\exception\ValidateException;
20 21
 use think\facade\Cache;
21 22
 use think\facade\Db;
@@ -46,7 +47,7 @@ class StoreGroupOrderRepository extends BaseRepository
46 47
      * @param $limit
47 48
      * @return array
48 49
      * @throws \think\db\exception\DataNotFoundException
49
-     * @throws \think\db\exception\DbException
50
+     * @throws DbException
50 51
      * @throws \think\db\exception\ModelNotFoundException
51 52
      * @author xaboy
52 53
      * @day 2020/6/10
@@ -68,7 +69,7 @@ class StoreGroupOrderRepository extends BaseRepository
68 69
      * @param $id
69 70
      * @return array|\think\Model|null
70 71
      * @throws \think\db\exception\DataNotFoundException
71
-     * @throws \think\db\exception\DbException
72
+     * @throws DbException
72 73
      * @throws \think\db\exception\ModelNotFoundException
73 74
      * @author xaboy
74 75
      * @day 2020/6/10
@@ -88,7 +89,7 @@ class StoreGroupOrderRepository extends BaseRepository
88 89
      * @param $id
89 90
      * @return array|\think\Model|null
90 91
      * @throws \think\db\exception\DataNotFoundException
91
-     * @throws \think\db\exception\DbException
92
+     * @throws DbException
92 93
      * @throws \think\db\exception\ModelNotFoundException
93 94
      * @author xaboy
94 95
      * @day 2020/6/10
@@ -115,7 +116,7 @@ class StoreGroupOrderRepository extends BaseRepository
115 116
      * @param $id
116 117
      * @return array|\think\Model|null
117 118
      * @throws \think\db\exception\DataNotFoundException
118
-     * @throws \think\db\exception\DbException
119
+     * @throws DbException
119 120
      * @throws \think\db\exception\ModelNotFoundException
120 121
      * @author xaboy
121 122
      * @day 2020/6/10
@@ -129,7 +130,7 @@ class StoreGroupOrderRepository extends BaseRepository
129 130
      * @param $id
130 131
      * @param null $uid
131 132
      * @throws \think\db\exception\DataNotFoundException
132
-     * @throws \think\db\exception\DbException
133
+     * @throws DbException
133 134
      * @throws \think\db\exception\ModelNotFoundException
134 135
      * @author xaboy
135 136
      * @day 2020/6/10
@@ -231,7 +232,7 @@ class StoreGroupOrderRepository extends BaseRepository
231 232
      * @param $product_id
232 233
      * @return array
233 234
      * @throws \think\db\exception\DataNotFoundException
234
-     * @throws \think\db\exception\DbException
235
+     * @throws DbException
235 236
      * @throws \think\db\exception\ModelNotFoundException
236 237
      */
237 238
     public function ProductOutCancel($product_id){
@@ -276,4 +277,32 @@ class StoreGroupOrderRepository extends BaseRepository
276 277
     {
277 278
         return $this->dao->getStoreGroupOrderEntityListByGroupOrderIdList($groupOrderIdList);
278 279
     }
280
+
281
+    public function create($data)
282
+    {
283
+        return $this->dao->create($data);
284
+    }
285
+
286
+    /**
287
+     * 写入贡献值记录
288
+     * @param StoreGroupOrderEntity $storeGroupOrderEntity
289
+     * @return StoreGroupOrderEntity
290
+     */
291
+    public function createByEntity(StoreGroupOrderEntity $storeGroupOrderEntity): StoreGroupOrderEntity
292
+    {
293
+        $result = $this->create($storeGroupOrderEntity->toUnderlineArray())->toArray();
294
+        /** @var StoreGroupOrderEntity $entity */
295
+        $entity = StoreGroupOrderEntity::newInstance($result);
296
+        return $entity;
297
+    }
298
+
299
+    /**
300
+     * @param $groupOrderId
301
+     * @return int
302
+     * @throws DbException
303
+     */
304
+    public function paySuccess($groupOrderId): int
305
+    {
306
+        return $this->dao->paySuccess($groupOrderId);
307
+    }
279 308
 }

Разлика између датотеке није приказан због своје велике величине
+ 888 - 805
app/common/repositories/store/order/StoreOrderRepository.php


+ 20 - 6
app/common/repositories/store/product/ProductAttrValueRepository.php

@@ -8,7 +8,7 @@ namespace app\common\repositories\store\product;
8 8
 
9 9
 use app\common\repositories\BaseRepository;
10 10
 use app\common\dao\store\product\ProductAttrValueDao as dao;
11
-use app\entity\data\store\ProductAttrValueEntity;
11
+use app\entity\data\store\StoreProductAttrValueEntity;
12 12
 use app\traits\GongApiRequest;
13 13
 use think\exception\ValidateException;
14 14
 use crmeb\exceptions\AuthException;
@@ -163,12 +163,26 @@ class ProductAttrValueRepository extends BaseRepository
163 163
 
164 164
     /**
165 165
      * @param string $unique
166
-     * @return ProductAttrValueEntity
166
+     * @return StoreProductAttrValueEntity
167 167
      */
168
-    public function getProductAttrValueEntityByUnique(string $unique): ProductAttrValueEntity
168
+    public function getStoreProductAttrValueEntityByUnique(string $unique): StoreProductAttrValueEntity
169 169
     {
170
-        /** @var ProductAttrValueEntity $productAttrValueEntity */
171
-        $productAttrValueEntity = $this->dao->getProductAttrValueEntityByUnique($unique);
172
-        return $productAttrValueEntity;
170
+        $entityList = $this->getStoreProductAttrValueEntityListByUniqueList([$unique]);
171
+        $entity = array_shift($entityList);
172
+        if ($entity instanceof StoreProductAttrValueEntity) {
173
+            return $entity;
174
+        } else {
175
+            /** @var StoreProductAttrValueEntity */
176
+            return StoreProductAttrValueEntity::newInstance();
177
+        }
178
+    }
179
+
180
+    /**
181
+     * @param array $uniqueList
182
+     * @return StoreProductAttrValueEntity[]
183
+     */
184
+    public function getStoreProductAttrValueEntityListByUniqueList(array $uniqueList): array
185
+    {
186
+        return $this->dao->getStoreProductAttrValueEntityListByUniqueList($uniqueList);
173 187
     }
174 188
 }

+ 20 - 6
app/common/repositories/store/product/ProductRepository.php

@@ -23,7 +23,7 @@ use app\common\repositories\user\UserVisitRepository;
23 23
 use app\common\repositories\wechat\RoutineQrcodeRepository;
24 24
 use app\common\repositories\wechat\WechatQrcodeRepository;
25 25
 use app\controller\merchant\gong\Goods;
26
-use app\entity\data\store\ProductEntity;
26
+use app\entity\data\store\StoreProductEntity;
27 27
 use app\traits\ShouxinyiApiRequest;
28 28
 use crmeb\exceptions\ApiException;
29 29
 use crmeb\services\QrcodeService;
@@ -2113,12 +2113,26 @@ class ProductRepository extends BaseRepository
2113 2113
 
2114 2114
     /**
2115 2115
      * @param int $productId
2116
-     * @return ProductEntity
2116
+     * @return StoreProductEntity
2117 2117
      */
2118
-    public function getProductEntityByProductId(int $productId): ProductEntity
2118
+    public function getStoreProductEntityByProductId(int $productId): StoreProductEntity
2119 2119
     {
2120
-        /** @var ProductEntity $productEntity */
2121
-        $productEntity = $this->dao->getProductEntityByProductId($productId);
2122
-        return $productEntity;
2120
+        $entityList = $this->getStoreProductEntityListByProductIdList([$productId]);
2121
+        $entity = array_shift($entityList);
2122
+        if ($entity instanceof StoreProductEntity) {
2123
+            return $entity;
2124
+        } else {
2125
+            /** @var StoreProductEntity */
2126
+            return StoreProductEntity::newInstance();
2127
+        }
2128
+    }
2129
+
2130
+    /**
2131
+     * @param array $idList
2132
+     * @return StoreProductEntity[]
2133
+     */
2134
+    public function getStoreProductEntityListByProductIdList(array $idList): array
2135
+    {
2136
+        return $this->dao->getUserSignGongxianEntityListByIdList($idList);
2123 2137
     }
2124 2138
 }

+ 17 - 3
app/common/repositories/system/merchant/MerchantRepository.php

@@ -1016,9 +1016,23 @@ class MerchantRepository extends BaseRepository
1016 1016
      */
1017 1017
     public function getMerchantEntityByMerchantId(int $merchantId): MerchantEntity
1018 1018
     {
1019
-        /** @var MerchantEntity $entity */
1020
-        $entity = $this->dao->getMerchantEntityByMerchantId($merchantId);
1021
-        return $entity;
1019
+        $entityList = $this->getMerchantEntityListByMerchantIdList([$merchantId]);
1020
+        $entity = array_shift($entityList);
1021
+        if ($entity instanceof MerchantEntity) {
1022
+            return $entity;
1023
+        } else {
1024
+            /** @var MerchantEntity */
1025
+            return MerchantEntity::newInstance();
1026
+        }
1027
+    }
1028
+
1029
+    /**
1030
+     * @param array $idList
1031
+     * @return MerchantEntity[]
1032
+     */
1033
+    public function getMerchantEntityListByMerchantIdList(array $idList): array
1034
+    {
1035
+        return $this->dao->getMerchantEntityListByMerchantIdList($idList);
1022 1036
     }
1023 1037
 
1024 1038
 }

+ 135 - 0
app/common/repositories/user/UserPvLogRepository.php

@@ -6,7 +6,9 @@ use app\common\dao\user\UserPvLogDao;
6 6
 use app\common\enum\user\UserPvLogEnum;
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\UserPvLogEntity;
11
+use think\db\exception\DbException;
10 12
 use think\exception\ValidateException;
11 13
 
12 14
 class UserPvLogRepository extends BaseRepository
@@ -16,6 +18,41 @@ class UserPvLogRepository extends BaseRepository
16 18
         $this->dao = $dao;
17 19
     }
18 20
 
21
+    /**
22
+     * @param int $id
23
+     * @return UserPvLogEntity
24
+     */
25
+    public function getUserPvLogEntityById(int $id): UserPvLogEntity
26
+    {
27
+        $entityList = $this->getUserPvLogEntityListByIdList([$id]);
28
+        $entity = array_shift($entityList);
29
+        if ($entity instanceof UserPvLogEntity) {
30
+            return $entity;
31
+        } else {
32
+            /** @var UserPvLogEntity */
33
+            return UserPvLogEntity::newInstance();
34
+        }
35
+    }
36
+
37
+    /**
38
+     * @param array $idList
39
+     * @return UserPvLogEntity[]
40
+     */
41
+    public function getUserPvLogEntityListByIdList(array $idList): array
42
+    {
43
+        return $this->dao->getUserPvLogEntityListByIdList($idList);
44
+    }
45
+
46
+    /**
47
+     * @param string $orderType
48
+     * @param array $orderIdList
49
+     * @return UserPvLogEntity[]
50
+     */
51
+    public function getUserPvLogEntityListByOrderIdListAndPending(string $orderType, array $orderIdList): array
52
+    {
53
+        return $this->dao->getUserPvLogEntityListByOrderIdListAndPending($orderType, $orderIdList);
54
+    }
55
+
19 56
     public function create($data)
20 57
     {
21 58
         return $this->dao->create($data);
@@ -70,4 +107,102 @@ class UserPvLogRepository extends BaseRepository
70 107
 
71 108
         return $this->createByEntity($userPvLogEntity);
72 109
     }
110
+
111
+    /**
112
+     * 将 贡献值 直推贡献值 记录设置为生效状态 并对用户的 贡献值 直推贡献值 字段进行增减
113
+     * @param array $idList
114
+     * @return array
115
+     */
116
+    public function executeByIdList(array $idList): array
117
+    {
118
+        $userPvLogEntityList = $this->getUserPvLogEntityListByIdList($idList);
119
+        $userIdList = [];
120
+
121
+        // 忽略 已经生效的 记录
122
+        $userPvLogEntityList = array_filter($userPvLogEntityList, function ($entity) use (&$userIdList) {
123
+            // 积分数据不为空 用户不为空 状态属于待结算 并且结算字段为空
124
+            if ((!empty($entity->getId()) && !empty($entity->getUid()) && ($entity->getStatus() == UserPvLogEnum::STATUS['PendingConfirmation']['code']) && empty($entity->getSettlementTime()))) {
125
+                $userIdList[] = $entity->getUid();
126
+                return true;
127
+            }
128
+            return false;
129
+        });
130
+
131
+        if (!empty($userPvLogEntityList)) {
132
+            // 获取用户 映射信息
133
+            /** @var UserRepository $userRepository */
134
+            $userRepository = app()->make(UserRepository::class);
135
+            /** @var UserEntity[] $userEntityMapByUid */
136
+            $userEntityMapByUid = [];
137
+            if (!empty($userIdList)) {
138
+                $userEntityMapByUid = $userRepository->getUserEntityMapByUidList($userIdList);
139
+            }
140
+
141
+            /** @var UserEntity[] $updateUserEntityList */
142
+            $updateUserEntityList = [];
143
+            /** @var UserPvLogEntity[] $updateUserPvLogEntityList */
144
+            $updateUserPvLogEntityList = [];
145
+            foreach ($userPvLogEntityList as $userPvLogEntity) {
146
+
147
+                $userEntity = $userEntityMapByUid[$userPvLogEntity->getUid()];
148
+                if (empty($userEntity) || empty($userEntity->getUid())) {
149
+                    throw new ValidateException("未查询到用户信息(PvLogId:{$userPvLogEntity->getId()})");
150
+                }
151
+
152
+                // 组建 更新 用户信息
153
+                if (isset($updateUserEntityList[$userEntity->getUid()])) {
154
+                    $updateUserEntity = $updateUserEntityList[$userEntity->getUid()];
155
+                } else {
156
+                    /** @var UserEntity $updateUserEntity */
157
+                    $updateUserEntity = UserEntity::newInstance();
158
+                    $updateUserEntity
159
+                        ->setUid($userEntity->getUid())
160
+                        ->setPv($userEntity->getPv());
161
+                }
162
+                // 组建 账单 记录
163
+                if (isset($updateUserPvLogEntityList[$userPvLogEntity->getId()])) {
164
+                    $updateUserPvLogEntity = $updateUserPvLogEntityList[$userPvLogEntity->getId()];
165
+                } else {
166
+                    /** @var UserPvLogEntity $updateUserPvLogEntity */
167
+                    $updateUserPvLogEntity = UserPvLogEntity::newInstance();
168
+                    // 更新 账单记录 状态
169
+                    $updateUserPvLogEntity
170
+                        ->setId($userPvLogEntity->getId())
171
+                        ->setStatus(UserPvLogEnum::STATUS['Valid']['code'])
172
+                        ->setSettlementTime(date('Y-m-d H:i:s'));
173
+                }
174
+                // 写入Pv
175
+                $updateUserEntity->setPv(bcadd($updateUserEntity->getPv(), $userPvLogEntity->getPv(), 2));
176
+
177
+                $updateUserEntityList[$userPvLogEntity->getUid()] = $updateUserEntity;
178
+                $updateUserPvLogEntityList[$userPvLogEntity->getId()] = $updateUserPvLogEntity;
179
+            }
180
+
181
+            if (!empty($updateUserEntityList)) {
182
+                $userRepository->batchUpdateUserDataByDataList(
183
+                    array_map(function (UserEntity $updateUserEntity) {
184
+                        return $updateUserEntity->toUnderlineArray();
185
+                    }, $updateUserEntityList)
186
+                );
187
+            }
188
+
189
+            if (!empty($updateUserBillEntityList)) {
190
+                $this->batchUpdateUserPvLogDataByDataList(
191
+                    array_map(function (UserPvLogEntity $updateUserPvLogEntity) {
192
+                        return $updateUserPvLogEntity->toUnderlineArray();
193
+                    }, $updateUserPvLogEntityList)
194
+                );
195
+            }
196
+        }
197
+        return $idList;
198
+    }
199
+
200
+    /**
201
+     * @param $dataList
202
+     * @return array
203
+     */
204
+    public function batchUpdateUserPvLogDataByDataList($dataList): array
205
+    {
206
+        return $this->dao->saveAll($dataList);
207
+    }
73 208
 }

+ 14 - 18
app/common/repositories/user/UserSignGongxianRepository.php

@@ -52,7 +52,7 @@ class UserSignGongxianRepository extends BaseRepository
52 52
     {
53 53
         return $this->dao->getUserSignGongxianEntityListByOrderIdListAndPending($orderType, $orderIdList);
54 54
     }
55
-    
55
+
56 56
     public function create($data)
57 57
     {
58 58
         return $this->dao->create($data);
@@ -206,24 +206,20 @@ class UserSignGongxianRepository extends BaseRepository
206 206
                 $updateUserEntityList[$userSignGongxianEntity->getUid()] = $updateUserEntity;
207 207
                 $updateUserScoreEntityList[$userSignGongxianEntity->getId()] = $updateUserSignGongxianEntity;
208 208
             }
209
-            try {
210
-                if (!empty($updateUserEntityList)) {
211
-                    $userRepository->batchUpdateUserDataByDataList(
212
-                        array_map(function (UserEntity $updateUserEntity) {
213
-                            return $updateUserEntity->toUnderlineArray();
214
-                        }, $updateUserEntityList)
215
-                    );
216
-                }
217
-
218
-                if (!empty($updateUserBillEntityList)) {
219
-                    $this->batchUpdateUserSignGongxianDataByDataList(
220
-                        array_map(function (UserSignGongxianEntity $updateUserSignGongxianEntity) {
221
-                            return $updateUserSignGongxianEntity->toUnderlineArray();
222
-                        }, $updateUserScoreEntityList)
223
-                    );
224
-                }
225
-            } catch (DbException $e) {
209
+            if (!empty($updateUserEntityList)) {
210
+                $userRepository->batchUpdateUserDataByDataList(
211
+                    array_map(function (UserEntity $updateUserEntity) {
212
+                        return $updateUserEntity->toUnderlineArray();
213
+                    }, $updateUserEntityList)
214
+                );
215
+            }
226 216
 
217
+            if (!empty($updateUserBillEntityList)) {
218
+                $this->batchUpdateUserSignGongxianDataByDataList(
219
+                    array_map(function (UserSignGongxianEntity $updateUserSignGongxianEntity) {
220
+                        return $updateUserSignGongxianEntity->toUnderlineArray();
221
+                    }, $updateUserScoreEntityList)
222
+                );
227 223
             }
228 224
         }
229 225
         return $idList;

+ 142 - 0
app/common/repositories/user/UserSignHongbaoRepository.php

@@ -6,7 +6,9 @@ use app\common\dao\user\UserSignHongbaoDao;
6 6
 use app\common\enum\user\UserSignHongbaoEnum;
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\UserSignHongbaoEntity;
11
+use think\db\exception\DbException;
10 12
 use think\exception\ValidateException;
11 13
 
12 14
 class UserSignHongbaoRepository extends BaseRepository
@@ -16,6 +18,41 @@ class UserSignHongbaoRepository extends BaseRepository
16 18
         $this->dao = $dao;
17 19
     }
18 20
 
21
+    /**
22
+     * @param int $id
23
+     * @return UserSignHongbaoEntity
24
+     */
25
+    public function getUserSignHongbaoEntityById(int $id): UserSignHongbaoEntity
26
+    {
27
+        $entityList = $this->getUserSignHongbaoEntityListByIdList([$id]);
28
+        $entity = array_shift($entityList);
29
+        if ($entity instanceof UserSignHongbaoEntity) {
30
+            return $entity;
31
+        } else {
32
+            /** @var UserSignHongbaoEntity */
33
+            return UserSignHongbaoEntity::newInstance();
34
+        }
35
+    }
36
+
37
+    /**
38
+     * @param array $idList
39
+     * @return UserSignHongbaoEntity[]
40
+     */
41
+    public function getUserSignHongbaoEntityListByIdList(array $idList): array
42
+    {
43
+        return $this->dao->getUserSignHongbaoEntityListByIdList($idList);
44
+    }
45
+
46
+    /**
47
+     * @param string $orderType
48
+     * @param array $orderIdList
49
+     * @return UserSignHongbaoEntity[]
50
+     */
51
+    public function getUserSignHongbaoEntityListByOrderIdListAndPending(string $orderType, array $orderIdList): array
52
+    {
53
+        return $this->dao->getUserSignHongbaoEntityListByOrderIdListAndPending($orderType, $orderIdList);
54
+    }
55
+
19 56
     public function create($data)
20 57
     {
21 58
         return $this->dao->create($data);
@@ -73,4 +110,109 @@ class UserSignHongbaoRepository extends BaseRepository
73 110
         return $this->createByEntity($userSignHongbaoEntity);
74 111
     }
75 112
 
113
+    /**
114
+     * 将 贡献值 直推贡献值 记录设置为生效状态 并对用户的 贡献值 直推贡献值 字段进行增减
115
+     * @param array $idList
116
+     * @return array
117
+     */
118
+    public function executeByIdList(array $idList): array
119
+    {
120
+        $userSignHongbaoEntityList = $this->getUserSignHongbaoEntityListByIdList($idList);
121
+        $userIdList = [];
122
+
123
+        // 忽略 已经生效的 记录
124
+        $userSignHongbaoEntityList = array_filter($userSignHongbaoEntityList, function ($entity) use (&$userIdList) {
125
+            // 积分数据不为空 用户不为空 状态属于待结算 并且结算字段为空
126
+            if ((!empty($entity->getId()) && !empty($entity->getUid()) && ($entity->getStatus() == UserSignHongbaoEnum::STATUS['PendingConfirmation']['code']) && empty($entity->getSettlementTime()))) {
127
+                $userIdList[] = $entity->getUid();
128
+                return true;
129
+            }
130
+            return false;
131
+        });
132
+
133
+        if (!empty($userSignHongbaoEntityList)) {
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 UserSignHongbaoEntity[] $updateUserSignHongbaoEntityList */
146
+            $updateUserSignHongbaoEntityList = [];
147
+            foreach ($userSignHongbaoEntityList as $userSignHongbaoEntity) {
148
+
149
+                $userEntity = $userEntityMapByUid[$userSignHongbaoEntity->getUid()];
150
+                if (empty($userEntity) || empty($userEntity->getUid())) {
151
+                    throw new ValidateException("未查询到用户信息(HongbaoId:{$userSignHongbaoEntity->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
+                        ->setHongbao($userEntity->getHongbao());
163
+                }
164
+                // 组建 账单 记录
165
+                if (isset($updateUserSignHongbaoEntityList[$userSignHongbaoEntity->getId()])) {
166
+                    $updateUserSignHongbaoEntity = $updateUserSignHongbaoEntityList[$userSignHongbaoEntity->getId()];
167
+                } else {
168
+                    /** @var UserSignHongbaoEntity $updateUserSignHongbaoEntity */
169
+                    $updateUserSignHongbaoEntity = UserSignHongbaoEntity::newInstance();
170
+                    // 更新 账单记录 状态
171
+                    $updateUserSignHongbaoEntity
172
+                        ->setId($userSignHongbaoEntity->getId())
173
+                        ->setStatus(UserSignHongbaoEnum::STATUS['Valid']['code'])
174
+                        ->setSettlementTime(date('Y-m-d H:i:s'));
175
+                }
176
+
177
+                if ($userSignHongbaoEntity->getType() == UserSignHongbaoEnum::TYPE['Consumption']['code']) {
178
+                    // 消耗
179
+                    $updateUserEntity->setHongbao(bcsub($updateUserEntity->getHongbao(), $userSignHongbaoEntity->getNumber(), 2));
180
+                    if ($updateUserEntity->getHongbao() < 0.00) {
181
+                        throw new ValidateException('用户红包不足');
182
+                    }
183
+                } else {
184
+                    $updateUserEntity->setHongbao(bcadd($updateUserEntity->getHongbao(), $userSignHongbaoEntity->getNumber(), 2));
185
+                }
186
+                $updateUserSignHongbaoEntity->setSurplus($updateUserEntity->getHongbao());
187
+
188
+                $updateUserEntityList[$userSignHongbaoEntity->getUid()] = $updateUserEntity;
189
+                $updateUserSignHongbaoEntityList[$userSignHongbaoEntity->getId()] = $updateUserSignHongbaoEntity;
190
+            }
191
+            if (!empty($updateUserEntityList)) {
192
+                $userRepository->batchUpdateUserDataByDataList(
193
+                    array_map(function (UserEntity $updateUserEntity) {
194
+                        return $updateUserEntity->toUnderlineArray();
195
+                    }, $updateUserEntityList)
196
+                );
197
+            }
198
+
199
+            if (!empty($updateUserBillEntityList)) {
200
+                $this->batchUpdateUserSignHongbaoDataByDataList(
201
+                    array_map(function (UserSignHongbaoEntity $updateUserSignHongbaoEntity) {
202
+                        return $updateUserSignHongbaoEntity->toUnderlineArray();
203
+                    }, $updateUserSignHongbaoEntityList)
204
+                );
205
+            }
206
+        }
207
+        return $idList;
208
+    }
209
+
210
+    /**
211
+     * @param $dataList
212
+     * @return array
213
+     */
214
+    public function batchUpdateUserSignHongbaoDataByDataList($dataList): array
215
+    {
216
+        return $this->dao->saveAll($dataList);
217
+    }
76 218
 }

+ 9 - 348
app/controller/api/store/order/StoreOrder.php

@@ -710,14 +710,8 @@ class StoreOrder
710 710
     }
711 711
 
712 712
     /**
713
-     * 理解注释
714
-     * store_cart 购物车表,每个人购物车里 有多件商品,每个商品在这张表里 都是一条记录
715 713
      * @param StoreOrderCreateValidate $storeOrderCreateValidate
716
-     * @return false|string|\think\response\Json
717
-     * @throws DataNotFoundException
718
-     * @throws DbException
719
-     * @throws ModelNotFoundException
720
-     * @throws \Throwable
714
+     * @return mixed
721 715
      */
722 716
     public function createOrderNew(StoreOrderCreateValidate $storeOrderCreateValidate)
723 717
     {
@@ -727,362 +721,29 @@ class StoreOrder
727 721
         if ($storeOrderCreateValidateResult['status'] == 'error') {
728 722
             return app('json')->fail($storeOrderCreateValidateResult['message']);
729 723
         }
730
-        // 验证通过,继续处理数据
731
-        /** @var StoreOrderCreateRequestEntity $storeOrderCreateRequestEntity */
732
-        $storeOrderCreateRequestEntity = $storeOrderCreateValidateResult['data'];
724
+
733 725
         // 根据用户ID 获取用户实体信息
734 726
         // $uid = $this->request->uid();
735 727
         $uid = 1592;
728
+        // 验证通过,继续处理数据
729
+        /** @var StoreOrderCreateRequestEntity $storeOrderCreateRequestEntity */
730
+        $storeOrderCreateRequestEntity = $storeOrderCreateValidateResult['data'];
731
+        $storeOrderCreateRequestEntity->setUid($uid);
736 732
 
737
-        // 2、加锁,他之前加的锁好像在锁狗屎,毛线都没锁住, 而且为什么要锁用户
733
+        // 2、加锁
738 734
         // 增加锁,防止同一用户重读点击
739 735
         $redisHandler = Cache::store('redis')->handler();
740 736
         $cartIdList = $storeOrderCreateRequestEntity->getCartIdList();
741 737
         sort($cartIdList);
742
-        $isSet = $redisHandler->set('createOrder' . $uid . '-' . implode('-', $cartIdList), 1, ['nx', 'ex' => 30]);
738
+        $isSet = $redisHandler->set('createOrder' . '-' . implode('-', $cartIdList), 1, ['nx', 'ex' => 30]);
743 739
         if (!$isSet) {
744 740
             return app('json')->fail('请勿重复下单');
745 741
         }
746 742
 
747
-        /** @var UserRepository $userRepository */
748
-        $userRepository = app()->make(UserRepository::class);
749
-        $userEntity = $userRepository->getUserEntityByUid($uid);
750
-        if (empty($userEntity->getUid())) {
751
-            return app('json')->fail('获取当前用户信息失败');
752
-        }
753
-
754
-        // 目前购物车只能添加一件商品,据了解之前 写的购物车,添加多件商品组合支付时计算的 金额和 VR 积分之类的会有问题
755
-        /** @var StoreCartRepository $storeCartRepository */
756
-        $storeCartRepository = app()->make(StoreCartRepository::class);
757
-        $cartEntityList = $storeCartRepository->getCartEntityListByCartIdList($storeOrderCreateRequestEntity->getCartIdList());
758
-        if (empty($cartEntityList) || count($storeOrderCreateRequestEntity->getCartIdList()) != count($cartEntityList)) {
759
-            return app('json')->fail('获取购物车内容失败');
760
-        }
761
-        // 确认购物车内 微唯宝 的商品 是否满足发货
762
-        foreach ($cartEntityList as $cartEntity) {
763
-            /** @var ProductAttrValueRepository $productAttrValueRepository */
764
-            $productAttrValueRepository = app()->make(ProductAttrValueRepository::class);
765
-            // 检查库存 查看 此商品已下架 此商品规格无货 此商品不支持该地区
766
-            // (按照代码中所写的逻辑来推理:从微唯宝拉取过来,从而上架到商品表的商品,都有SPUId,所以去走微唯宝提供的接口验证,而会员专区和商贸区的商品可能是商户自己加的,没有SPUId,所以也就不用走微唯宝的验证)
767
-            $checkGong = $productAttrValueRepository->checkGong($cartEntity->getProductId(), $cartEntity->getProductAttrUnique(), $cartEntity->getCartNum(), $uid, $storeOrderCreateRequestEntity->getAddressId());
768
-            if (isset($checkGong['code']) && $checkGong['code'] == -1) {
769
-                return app('json')->fail($checkGong['message']);
770
-            }
771
-        }
772
-
773
-        // 获取 用户收货地址
774
-        /** @var UserAddressRepository $userAddressRepository */
775
-        $userAddressRepository = app()->make(UserAddressRepository::class);
776
-        $addressEntity = $userAddressRepository->getAddressEntityByAddressId($storeOrderCreateRequestEntity->getAddressId());
777
-        if (empty($addressEntity->getAddressId()) || $addressEntity->getUid() != $uid) {
778
-            return app('json')->fail('请选择正确的收货地址');
779
-        }
780
-        if (empty($addressEntity->getCodeList())) {
781
-            return app('json')->fail('地址需要选择4级地址!请修改地址!');
782
-        }
783
-
784
-        // 判断是否分享
785
-        /** @var ShareRepository $shareRepository */
786
-        $shareRepository = app()->make(ShareRepository::class);
787
-        $shareEntity = $shareRepository->getShareEntityByShareId($storeOrderCreateRequestEntity->getShareId());
788
-
789
-
790
-
791
-
792
-        $result = $this->repository->createOrderNew($storeOrderCreateRequestEntity, $userEntity, $cartEntityList, $addressEntity, $shareEntity);
743
+        $result = $this->repository->createOrderNew2($storeOrderCreateRequestEntity);
793 744
         
794 745
         
795 746
         return app('json')->success('aaa', $result);
796
-        $uid = $this->request->uid();
797
-
798
-        $this->repository->createOrderNew($uid, $allParams);
799
-
800
-
801
-        $allParams = input();
802
-
803
-        $cartId = $allParams['cart_id'];
804
-
805
-        $fzonePayType = $allParams['fzone_paytype'];
806
-        $fzonePayTypeMap = $allParams['fzone_paytype'];
807
-        $addressId = (int)($allParams['address_id'] ?? 0); // 地址ID
808
-
809
-        $payType = $this->request->param('pay_type');// 5积分 6京豆
810
-        $share_id = $this->request->param('share_id', '');//分享id
811
-        $mer_id = $this->request->param('mer_id', '');//分享id
812
-        // 声明 引用
813
-
814
-
815
-
816
-
817
-        // 3、验证购物车内商品 是否已下架,是否无货,是否支持发货 是否满足数量
818
-        // 处理购物车 按照之前需求的意思,应该 每次下单 只能购买 一个SPU 的 一个SKU,而且只能买一件
819
-        //在提交订单之前会产出购物车cartid,其中会产生购买的数量,现在默认会员专区是只让购买一个商品,需要修改值为1
820
-        // try {
821
-        //     $storeCartDataList = Db::name('store_cart')
822
-        //         ->where('cart_id', $cartId)
823
-        //         ->select()
824
-        //         ->toArray();
825
-        // } catch (\Exception $e) {
826
-        //     return app('json')->fail('获取购物车内容失败');
827
-        // }
828
-        // 这块 限制还 欠完善考虑
829
-        if (count($storeCartDataList) > 1 || $storeCartDataList[0]['cart_num'] > 1) {
830
-            return app('json')->fail('购买数量默认为一件,请修改购买数量!');
831
-        }
832
-        // 确认购物车内 微唯宝 的商品 是否满足发货
833
-        /** @var ProductAttrValueRepository $productAttrValueRepository */
834
-        $productAttrValueRepository = app()->make(ProductAttrValueRepository::class);
835
-        foreach ($storeCartDataList as $k => $item) {
836
-            // 检查库存 查看 此商品已下架 此商品规格无货 此商品不支持该地区
837
-            // (按照代码中所写的逻辑来推理:从微唯宝拉取过来,从而上架到商品表的商品,都有SPUId,所以去走微唯宝提供的接口验证,而会员专区和商贸区的商品可能是商户自己加的,没有SPUId,所以也就不用走微唯宝的验证)
838
-            $checkGong = $productAttrValueRepository->checkGong($item['product_id'], $item['product_attr_unique'], $item['cart_num'], $uid, $addressId);
839
-            if (isset($checkGong['code']) && $checkGong['code'] == -1){
840
-                return app('json')->fail($checkGong['message']);
841
-            }
842
-        }
843
-
844
-        // 获取 用户收货地址
845
-        /** @var UserAddressRepository $userAddressRepository */
846
-        $userAddressRepository = app()->make(UserAddressRepository::class);
847
-        try {
848
-            $addressData = $userAddressRepository->getWhere(['uid' => $uid, 'address_id' => $addressId]);
849
-            // 如果不是会员专区的商品,则一定要用户完善的收货地址
850
-            if (empty($addressData['city_id'] ?? null)) {
851
-                return app('json')->fail('请选择正确的收货地址');
852
-            }
853
-            if (empty($addressData['code_list'] ?? null)) {
854
-                return app('json')->fail('地址需要选择4级地址!请修改地址!');
855
-            }
856
-        } catch (\Exception $e) {
857
-            return app('json')->fail('获取用户收货地址失败');
858
-        }
859
-
860
-
861
-        $array_fzone_paytype_all = [
862
-            'fzone_pay_jingdou' => 0,
863
-            'fzone_pay_vr' => 0,
864
-            'fzone_pay_jifen' => 0,
865
-            'fzone_pay_price' => 0,
866
-            'fzone_pay_other' => $fzonePayTypeMap['other'],
867
-            'fzone_pay_note' => $fzonePayTypeMap['note'],
868
-            'fzone_pay_type' => $fzonePayTypeMap['type'],
869
-        ];
870
-
871
-        //会员专区升级产生的user_of_goods订单ID赋值
872
-        $getuserofgoodsid = 1;
873
-
874
-        if (!empty($fzonePayTypeMap['type'])) {
875
-            if (!empty($fzonePayTypeMap['type'] == 'b1')) {
876
-                //精彩生活VR+积分
877
-                //vr+积分
878
-                $vrpri = $userData['vr'] - $fzonePayTypeMap['price'];
879
-                $pricepri = $userData['score'] - $fzonePayTypeMap['other'];
880
-                //vr+积分
881
-                if ($vrpri < 0 || $pricepri < 0) {
882
-                    return app('json')->fail("支付失败,VR或积分不足!");
883
-                }
884
-                $array_fzone_paytype_all['fzone_pay_vr'] = $fzonePayTypeMap['price'];
885
-                $array_fzone_paytype_all['fzone_pay_jifen'] = $fzonePayTypeMap['other'];
886
-
887
-            } else if (!empty($fzonePayTypeMap['type'] == 'b2')) {
888
-                //精彩生活现金+积分
889
-                //商贸区:现金+积分
890
-
891
-                $vrpri = $userData['score'] - $fzonePayTypeMap['other'];
892
-
893
-                // //现金+积分
894
-                if ($vrpri < 0) {
895
-                    return app('json')->fail("支付失败,积分不足!");
896
-                }
897
-                $array_fzone_paytype_all['fzone_pay_price'] = $fzonePayTypeMap['price'];
898
-                $array_fzone_paytype_all['fzone_pay_jifen'] = $fzonePayTypeMap['other'];
899
-
900
-            } else if (!empty($fzonePayTypeMap['type'] == 'b3')) {
901
-                //精彩生活区 VR+京豆
902
-                $vrpri = $userData['vr'] - $fzonePayTypeMap['price'];
903
-                $pricepri = $userData['jingdou'] - $fzonePayTypeMap['other'];
904
-                //vr+积分
905
-                if ($vrpri < 0 || $pricepri < 0) {
906
-                    return app('json')->fail("支付失败,VR或京豆不足!");
907
-                }
908
-                $array_fzone_paytype_all['fzone_pay_vr'] = $fzonePayTypeMap['price'];
909
-                $array_fzone_paytype_all['fzone_pay_jingdou'] = $fzonePayTypeMap['other'];
910
-            } else if (!empty($fzonePayTypeMap['type'] == 'b4')) {
911
-                //精彩生活区 现金+京豆
912
-                $pricepri = $userData['jingdou'] - $fzonePayTypeMap['other'];
913
-
914
-                // //现金+积分
915
-                if ($pricepri < 0) {
916
-                    return app('json')->fail("支付失败,京豆不足!");
917
-                }
918
-                $array_fzone_paytype_all['fzone_pay_price'] = $fzonePayTypeMap['price'];
919
-                $array_fzone_paytype_all['fzone_pay_jingdou'] = $fzonePayTypeMap['other'];
920
-                //                return app('json')->fail("开发中升级中!");
921
-
922
-            } else if (!empty($fzonePayTypeMap['type'] == 'b5')) {
923
-                //精彩生活 VR支付
924
-
925
-                $vrpri = $userData['vr'] - $fzonePayTypeMap['price'];
926
-
927
-                if ($vrpri < 0) {
928
-                    return app('json')->fail("支付失败,VR不足!");
929
-                }
930
-                $array_fzone_paytype_all['fzone_pay_vr'] = $fzonePayTypeMap['price'];
931
-            } else if (!empty($fzonePayTypeMap['type'] == 'a1')) {
932
-                //生活 VR支付
933
-
934
-                $vrpri = $userData['vr'] - $fzonePayTypeMap['price'];
935
-
936
-
937
-                if ($vrpri < 0) {
938
-                    return app('json')->fail("支付失败,VR不足!");
939
-                }
940
-                $array_fzone_paytype_all['fzone_pay_vr'] = $fzonePayTypeMap['price'];
941
-                // return app('json')->fail($userdatas['spread_old']);
942
-                //检查在旧表中是否有上级
943
-                if ($userData['spread_old'] != 0) {
944
-
945
-
946
-                    //查询当前用户的上级在1.0中是有数据的,那么老用户介绍新用户。
947
-                    $sf = Db::name('old_user_jbp')->where('id', $userData['uid'])->find();//父级在旧表有注册
948
-
949
-                    // $sf1 = Db::name('old_user_jbp')->where('id',$userdatas['id'])->find();
950
-
951
-                    // 当前用户是在2.0注册的新用户,父级是在1.0
952
-
953
-                    //当前用户在1.0中没有注册,但是父级在1.0系统中注册过。
954
-                    if (!empty($sf)) {
955
-
956
-                        //检查用户在旧表中是否与上级,有的话就是升级权限,要新增一个user_of_goods的表
957
-                        $data1['user_id'] = $uid;
958
-                        $data1['goods_list_id'] = 0;
959
-                        $data1['status'] = 0;
960
-                        $data1['spread_id'] = $sf['invite_id'];
961
-                        $data1['node_id'] = $sf['spread'];
962
-                        $data1['money'] = $fzonePayTypeMap['price'];
963
-                        $data1['order_id'] = 10;
964
-                        $data1['server_id'] = $userData['server_id_old'];
965
-                        $data1['pay_gb'] = 0;
966
-                        $data1['pay_vr'] = $fzonePayTypeMap['price'];
967
-                        $data1['pay_bt'] = 0;
968
-
969
-                        //return app('json')->fail("333");
970
-
971
-                        $sfe = Db::name('old_user_of_goods')->insertGetId($data1);
972
-
973
-                        if ($sfe) {
974
-                            $getuserofgoodsid = $sfe;
975
-                        }
976
-                    }
977
-
978
-
979
-                }
980
-
981
-
982
-                //Db::getLastInsID();
983
-
984
-            } else if (!empty($fzonePayTypeMap['type'] == 'a3')) {
985
-                //生活 现金 + VR支付
986
-
987
-
988
-                //检查在旧表中是否有上级
989
-                if ($userData['spread_old'] != 0) {
990
-
991
-
992
-                    //查询当前用户的上级在1.0中是有数据的,那么老用户介绍新用户。
993
-                    $sf = Db::name('old_user_jbp')->where('id', $userData['uid'])->find();//父级在旧表有注册
994
-                    //如果组合支付中,没有现金,只是用VR支付的情况下
995
-
996
-                    if ($fzonePayTypeMap['price'] <= 0.01) {
997
-                        return app('json')->fail("现金不足");
998
-                    }
999
-
1000
-                    // 当前用户是在2.0注册的新用户,父级是在1.0
1001
-
1002
-                    //当前用户在1.0中没有注册,但是父级在1.0系统中注册过。
1003
-                    if (!empty($sf)) {
1004
-
1005
-                        //检查用户在旧表中是否与上级,有的话就是升级权限,要新增一个user_of_goods的表
1006
-                        $data1['user_id'] = $uid;
1007
-                        $data1['goods_list_id'] = 0;
1008
-                        $data1['status'] = 0;
1009
-                        $data1['spread_id'] = $sf['invite_id'];
1010
-                        $data1['node_id'] = $sf['spread'];
1011
-                        $data1['money'] = $fzonePayTypeMap['price'];
1012
-                        $data1['order_id'] = 10;
1013
-                        $data1['server_id'] = $userData['server_id_old'];
1014
-                        $data1['pay_gb'] = 0;
1015
-                        $data1['pay_vr'] = $fzonePayTypeMap['price'];
1016
-                        $data1['pay_bt'] = 0;
1017
-
1018
-                        //return app('json')->fail("333");
1019
-
1020
-                        $sfe = Db::name('old_user_of_goods')->insertGetId($data1);
1021
-
1022
-                        if ($sfe) {
1023
-                            $getuserofgoodsid = $sfe;
1024
-                        }
1025
-                    }
1026
-
1027
-
1028
-                }
1029
-                $array_fzone_paytype_all['fzone_pay_price'] = $fzonePayTypeMap['price'];
1030
-                $array_fzone_paytype_all['fzone_pay_vr'] = $fzonePayTypeMap['other'];
1031
-
1032
-            } else if (!empty($fzonePayTypeMap['type'] == 'c1')) {
1033
-                //复购区 复购金支付
1034
-                $fugoupri = $userData['fugou'] - $fzonePayTypeMap['price'];
1035
-
1036
-                if ($fugoupri < 0) {
1037
-                    return app('json')->fail("支付失败,复购金不足!");
1038
-                }
1039
-                $array_fzone_paytype_all['fzone_pay_other'] = $fzonePayTypeMap['price'];
1040
-            } else {
1041
-                $array_fzone_paytype_all['fzone_pay_price'] = $fzonePayTypeMap['price'];
1042
-            }
1043
-        }
1044
-
1045
-
1046
-        //end
1047
-        //$getuserofgoodsid= 1;
1048
-
1049
-        makeLock()->lock();
1050
-        try {
1051
-            $groupOrder = $this->repository->createOrder($this->request->userInfo(), $payType, [$cartId], $addressId, 0, 0, 0, 0, 0, $share_id, 0, $mer_id, 0, 0, 0, 0, 0, 0, $fzonePayType, $getuserofgoodsid, $array_fzone_paytype_all);
1052
-            //var_dump($groupOrder);
1053
-        } catch (\Throwable $e) {
1054
-            makeLock()->unlock();
1055
-            throw $e;
1056
-        }
1057
-        makeLock()->unlock();
1058
-
1059
-
1060
-        //删除缓存的优惠价格
1061
-        // Cache::delete($uid.'_youhui_price_'.$product_type_id);
1062
-
1063
-        //return app('json')->status('success', '支付成功1', ['order_id' => $groupOrder['group_order_id']]);
1064
-        //利润
1065
-
1066
-
1067
-        if ($groupOrder['pay_price'] == 0) {
1068
-            $this->repository->paySuccess($groupOrder);
1069
-            return app('json')->status('success', '支付成功2', ['order_id' => $groupOrder['group_order_id']]);
1070
-        }
1071
-        try {
1072
-            $groupOrder['pay_price'] = set_price_rtrim($groupOrder['pay_price']);
1073
-            //
1074
-            if ($groupOrder['er'] == 0) {
1075
-
1076
-                return app('json')->success(['order_id' => $groupOrder->group_order_id, "groupOrder" => $groupOrder]);
1077
-            } else {
1078
-                return json_encode(array("status" => 400, "message" => $groupOrder['er1']));
1079
-            }
1080
-
1081
-
1082
-            //            return $this->repository->pay($payType, $this->request->userInfo(), $groupOrder);
1083
-        } catch (\Exception $e) {
1084
-            return app('json')->status('error', $e->getMessage(), ['order_id' => $groupOrder->group_order_id]);
1085
-        }
1086 747
     }
1087 748
 
1088 749
     /**

Разлика између датотеке није приказан због своје велике величине
+ 457 - 457
app/entity/data/merchant/MerchantEntity.php


+ 123 - 0
app/entity/data/product/ProductSeckillEntity.php

@@ -0,0 +1,123 @@
1
+<?php
2
+
3
+namespace app\entity\data\product;
4
+
5
+use app\entity\data\DataEntity;
6
+
7
+class ProductSeckillEntity extends DataEntity
8
+{
9
+    public $id = null;  // 自增ID
10
+    public $productId = null;  // 秒杀商品ID
11
+    public $seckillDate = null;  // 秒杀时间段
12
+    public $status = null;  // 状态 1 开启  0 关闭 2 已结束
13
+    public $ctime = null;  // 创建时间
14
+    public $merId = null;  // 商户ID
15
+
16
+    /**
17
+     * @return mixed
18
+     */
19
+    public function getId()
20
+    {
21
+        return $this->id;
22
+    }
23
+
24
+    /**
25
+     * @param mixed $id
26
+     * @return ProductSeckillEntity
27
+     */
28
+    public function setId($id): ProductSeckillEntity
29
+    {
30
+        $this->id = $id;
31
+        return $this;
32
+    }
33
+
34
+    /**
35
+     * @return mixed
36
+     */
37
+    public function getProductId()
38
+    {
39
+        return $this->productId;
40
+    }
41
+
42
+    /**
43
+     * @param mixed $productId
44
+     * @return ProductSeckillEntity
45
+     */
46
+    public function setProductId($productId): ProductSeckillEntity
47
+    {
48
+        $this->productId = $productId;
49
+        return $this;
50
+    }
51
+
52
+    /**
53
+     * @return mixed
54
+     */
55
+    public function getSeckillDate()
56
+    {
57
+        return $this->seckillDate;
58
+    }
59
+
60
+    /**
61
+     * @param mixed $seckillDate
62
+     * @return ProductSeckillEntity
63
+     */
64
+    public function setSeckillDate($seckillDate): ProductSeckillEntity
65
+    {
66
+        $this->seckillDate = $seckillDate;
67
+        return $this;
68
+    }
69
+
70
+    /**
71
+     * @return mixed
72
+     */
73
+    public function getStatus()
74
+    {
75
+        return $this->status;
76
+    }
77
+
78
+    /**
79
+     * @param mixed $status
80
+     * @return ProductSeckillEntity
81
+     */
82
+    public function setStatus($status): ProductSeckillEntity
83
+    {
84
+        $this->status = $status;
85
+        return $this;
86
+    }
87
+
88
+    /**
89
+     * @return mixed
90
+     */
91
+    public function getCtime()
92
+    {
93
+        return $this->ctime;
94
+    }
95
+
96
+    /**
97
+     * @param mixed $ctime
98
+     * @return ProductSeckillEntity
99
+     */
100
+    public function setCtime($ctime): ProductSeckillEntity
101
+    {
102
+        $this->ctime = $ctime;
103
+        return $this;
104
+    }
105
+
106
+    /**
107
+     * @return mixed
108
+     */
109
+    public function getMerId()
110
+    {
111
+        return $this->merId;
112
+    }
113
+
114
+    /**
115
+     * @param mixed $merId
116
+     * @return ProductSeckillEntity
117
+     */
118
+    public function setMerId($merId): ProductSeckillEntity
119
+    {
120
+        $this->merId = $merId;
121
+        return $this;
122
+    }
123
+}

+ 0 - 95
app/entity/data/product/SeckillEntity.php

@@ -1,95 +0,0 @@
1
-<?php
2
-
3
-namespace app\entity\data\product;
4
-
5
-use app\entity\data\DataEntity;
6
-
7
-class SeckillEntity extends DataEntity
8
-{
9
-    public $id = 0;  // 自增ID
10
-    public $productId = 0;  // 秒杀商品ID
11
-    public $seckillDate = null;  // 秒杀时间段
12
-    public $status = 1;  // 状态 1 开启  0 关闭 2 已结束
13
-    public $ctime = null;  // 创建时间
14
-    public $merId = 0;  // 商户ID
15
-
16
-    public function getId(): int
17
-    {
18
-        return $this->id;
19
-    }
20
-
21
-    public function setId(int $id): SeckillEntity
22
-    {
23
-        $this->id = $id;
24
-        return $this;
25
-    }
26
-
27
-    public function getProductId(): int
28
-    {
29
-        return $this->productId;
30
-    }
31
-
32
-    public function setProductId(int $productId): SeckillEntity
33
-    {
34
-        $this->productId = $productId;
35
-        return $this;
36
-    }
37
-
38
-    /**
39
-     * @return null
40
-     */
41
-    public function getSeckillDate()
42
-    {
43
-        return $this->seckillDate;
44
-    }
45
-
46
-    /**
47
-     * @param null $seckillDate
48
-     * @return SeckillEntity
49
-     */
50
-    public function setSeckillDate($seckillDate)
51
-    {
52
-        $this->seckillDate = $seckillDate;
53
-        return $this;
54
-    }
55
-
56
-    public function getStatus(): int
57
-    {
58
-        return $this->status;
59
-    }
60
-
61
-    public function setStatus(int $status): SeckillEntity
62
-    {
63
-        $this->status = $status;
64
-        return $this;
65
-    }
66
-
67
-    /**
68
-     * @return null
69
-     */
70
-    public function getCtime()
71
-    {
72
-        return $this->ctime;
73
-    }
74
-
75
-    /**
76
-     * @param null $ctime
77
-     * @return SeckillEntity
78
-     */
79
-    public function setCtime($ctime)
80
-    {
81
-        $this->ctime = $ctime;
82
-        return $this;
83
-    }
84
-
85
-    public function getMerId(): int
86
-    {
87
-        return $this->merId;
88
-    }
89
-
90
-    public function setMerId(int $merId): SeckillEntity
91
-    {
92
-        $this->merId = $merId;
93
-        return $this;
94
-    }
95
-}

+ 0 - 522
app/entity/data/store/ProductAttrValueEntity.php

@@ -1,522 +0,0 @@
1
-<?php
2
-
3
-namespace app\entity\data\store;
4
-
5
-use app\entity\data\DataEntity;
6
-
7
-class ProductAttrValueEntity extends DataEntity
8
-{
9
-    public $productId = 0;  // 商品ID
10
-    public $detail = '';  // 商品属性详细
11
-    public $sku = '';  // 商品属性索引值
12
-    public $stock = 0;  // 属性对应的库存
13
-    public $sales = 0;  // 销量
14
-    public $image = null;  // 图片
15
-    public $barCode = '';  // 产品条码
16
-    public $cost = 0.00;  // 成本价
17
-    public $otPrice = 0.00;  // 原价
18
-    public $price = 0.00;  // 价格
19
-    public $volume = 0.00;  // 体积
20
-    public $weight = 0.00;  // 重量
21
-    public $type = 0;  // 活动类型 0=商品
22
-    public $extensionOne = null;  // 养老金
23
-    public $extensionTwo = null;  // 二级佣金
24
-    public $unique = '';  // 唯一值
25
-    public $dacangPrice = 0.00;  // 大仓会员价
26
-    public $costPrice = null;  // 供应链成本价
27
-    public $gongSkuId = null;  // 供应链sku_id
28
-    public $gongMerProfit = null;  // 供应链创客利润
29
-    public $gongPension = null;  // 供应链养老金
30
-    public $gongMarketPrice = null;  // 供应链销售价
31
-    public $plateMerProfit = null;  // 商户创客利润
32
-    public $pensionNum = '0';  // 养老金%
33
-    public $shareNum = '0';  // 分享奖%
34
-    public $stockNum = '0';  // 股权%
35
-    public $sharesNum = '0';  // 股票
36
-
37
-    /**
38
-     * @return int
39
-     */
40
-    public function getProductId(): int
41
-    {
42
-        return $this->productId;
43
-    }
44
-
45
-    /**
46
-     * @param int $productId
47
-     * @return ProductAttrValueEntity
48
-     */
49
-    public function setProductId(int $productId): ProductAttrValueEntity
50
-    {
51
-        $this->productId = $productId;
52
-        return $this;
53
-    }
54
-
55
-    /**
56
-     * @return string
57
-     */
58
-    public function getDetail(): string
59
-    {
60
-        return $this->detail;
61
-    }
62
-
63
-    /**
64
-     * @param string $detail
65
-     * @return ProductAttrValueEntity
66
-     */
67
-    public function setDetail(string $detail): ProductAttrValueEntity
68
-    {
69
-        $this->detail = $detail;
70
-        return $this;
71
-    }
72
-
73
-    /**
74
-     * @return string
75
-     */
76
-    public function getSku(): string
77
-    {
78
-        return $this->sku;
79
-    }
80
-
81
-    /**
82
-     * @param string $sku
83
-     * @return ProductAttrValueEntity
84
-     */
85
-    public function setSku(string $sku): ProductAttrValueEntity
86
-    {
87
-        $this->sku = $sku;
88
-        return $this;
89
-    }
90
-
91
-    /**
92
-     * @return int
93
-     */
94
-    public function getStock(): int
95
-    {
96
-        return $this->stock;
97
-    }
98
-
99
-    /**
100
-     * @param int $stock
101
-     * @return ProductAttrValueEntity
102
-     */
103
-    public function setStock(int $stock): ProductAttrValueEntity
104
-    {
105
-        $this->stock = $stock;
106
-        return $this;
107
-    }
108
-
109
-    /**
110
-     * @return int
111
-     */
112
-    public function getSales(): int
113
-    {
114
-        return $this->sales;
115
-    }
116
-
117
-    /**
118
-     * @param int $sales
119
-     * @return ProductAttrValueEntity
120
-     */
121
-    public function setSales(int $sales): ProductAttrValueEntity
122
-    {
123
-        $this->sales = $sales;
124
-        return $this;
125
-    }
126
-
127
-    /**
128
-     * @return mixed
129
-     */
130
-    public function getImage()
131
-    {
132
-        return $this->image;
133
-    }
134
-
135
-    /**
136
-     * @param mixed $image
137
-     * @return ProductAttrValueEntity
138
-     */
139
-    public function setImage($image)
140
-    {
141
-        $this->image = $image;
142
-        return $this;
143
-    }
144
-
145
-    /**
146
-     * @return string
147
-     */
148
-    public function getBarCode(): string
149
-    {
150
-        return $this->barCode;
151
-    }
152
-
153
-    /**
154
-     * @param string $barCode
155
-     * @return ProductAttrValueEntity
156
-     */
157
-    public function setBarCode(string $barCode): ProductAttrValueEntity
158
-    {
159
-        $this->barCode = $barCode;
160
-        return $this;
161
-    }
162
-
163
-    /**
164
-     * @return float
165
-     */
166
-    public function getCost(): float
167
-    {
168
-        return $this->cost;
169
-    }
170
-
171
-    /**
172
-     * @param float $cost
173
-     * @return ProductAttrValueEntity
174
-     */
175
-    public function setCost(float $cost): ProductAttrValueEntity
176
-    {
177
-        $this->cost = $cost;
178
-        return $this;
179
-    }
180
-
181
-    /**
182
-     * @return float
183
-     */
184
-    public function getOtPrice(): float
185
-    {
186
-        return $this->otPrice;
187
-    }
188
-
189
-    /**
190
-     * @param float $otPrice
191
-     * @return ProductAttrValueEntity
192
-     */
193
-    public function setOtPrice(float $otPrice): ProductAttrValueEntity
194
-    {
195
-        $this->otPrice = $otPrice;
196
-        return $this;
197
-    }
198
-
199
-    /**
200
-     * @return float
201
-     */
202
-    public function getPrice(): float
203
-    {
204
-        return $this->price;
205
-    }
206
-
207
-    /**
208
-     * @param float $price
209
-     * @return ProductAttrValueEntity
210
-     */
211
-    public function setPrice(float $price): ProductAttrValueEntity
212
-    {
213
-        $this->price = $price;
214
-        return $this;
215
-    }
216
-
217
-    /**
218
-     * @return float
219
-     */
220
-    public function getVolume(): float
221
-    {
222
-        return $this->volume;
223
-    }
224
-
225
-    /**
226
-     * @param float $volume
227
-     * @return ProductAttrValueEntity
228
-     */
229
-    public function setVolume(float $volume): ProductAttrValueEntity
230
-    {
231
-        $this->volume = $volume;
232
-        return $this;
233
-    }
234
-
235
-    /**
236
-     * @return float
237
-     */
238
-    public function getWeight(): float
239
-    {
240
-        return $this->weight;
241
-    }
242
-
243
-    /**
244
-     * @param float $weight
245
-     * @return ProductAttrValueEntity
246
-     */
247
-    public function setWeight(float $weight): ProductAttrValueEntity
248
-    {
249
-        $this->weight = $weight;
250
-        return $this;
251
-    }
252
-
253
-    /**
254
-     * @return int
255
-     */
256
-    public function getType(): int
257
-    {
258
-        return $this->type;
259
-    }
260
-
261
-    /**
262
-     * @param int $type
263
-     * @return ProductAttrValueEntity
264
-     */
265
-    public function setType(int $type): ProductAttrValueEntity
266
-    {
267
-        $this->type = $type;
268
-        return $this;
269
-    }
270
-
271
-    /**
272
-     * @return mixed
273
-     */
274
-    public function getExtensionOne()
275
-    {
276
-        return $this->extensionOne;
277
-    }
278
-
279
-    /**
280
-     * @param mixed $extensionOne
281
-     * @return ProductAttrValueEntity
282
-     */
283
-    public function setExtensionOne($extensionOne)
284
-    {
285
-        $this->extensionOne = $extensionOne;
286
-        return $this;
287
-    }
288
-
289
-    /**
290
-     * @return mixed
291
-     */
292
-    public function getExtensionTwo()
293
-    {
294
-        return is_null($this->extensionTwo) ? 0.00 : $this->extensionTwo;
295
-    }
296
-
297
-    /**
298
-     * @param mixed $extensionTwo
299
-     * @return ProductAttrValueEntity
300
-     */
301
-    public function setExtensionTwo($extensionTwo)
302
-    {
303
-        $this->extensionTwo = $extensionTwo;
304
-        return $this;
305
-    }
306
-
307
-    /**
308
-     * @return string
309
-     */
310
-    public function getUnique(): string
311
-    {
312
-        return $this->unique;
313
-    }
314
-
315
-    /**
316
-     * @param string $unique
317
-     * @return ProductAttrValueEntity
318
-     */
319
-    public function setUnique(string $unique): ProductAttrValueEntity
320
-    {
321
-        $this->unique = $unique;
322
-        return $this;
323
-    }
324
-
325
-    /**
326
-     * @return float
327
-     */
328
-    public function getDacangPrice(): float
329
-    {
330
-        return $this->dacangPrice;
331
-    }
332
-
333
-    /**
334
-     * @param float $dacangPrice
335
-     * @return ProductAttrValueEntity
336
-     */
337
-    public function setDacangPrice(float $dacangPrice): ProductAttrValueEntity
338
-    {
339
-        $this->dacangPrice = $dacangPrice;
340
-        return $this;
341
-    }
342
-
343
-    /**
344
-     * @return mixed
345
-     */
346
-    public function getCostPrice()
347
-    {
348
-        return $this->costPrice;
349
-    }
350
-
351
-    /**
352
-     * @param mixed $costPrice
353
-     * @return ProductAttrValueEntity
354
-     */
355
-    public function setCostPrice($costPrice)
356
-    {
357
-        $this->costPrice = $costPrice;
358
-        return $this;
359
-    }
360
-
361
-    /**
362
-     * @return mixed
363
-     */
364
-    public function getGongSkuId()
365
-    {
366
-        return $this->gongSkuId;
367
-    }
368
-
369
-    /**
370
-     * @param mixed $gongSkuId
371
-     * @return ProductAttrValueEntity
372
-     */
373
-    public function setGongSkuId($gongSkuId)
374
-    {
375
-        $this->gongSkuId = $gongSkuId;
376
-        return $this;
377
-    }
378
-
379
-    /**
380
-     * @return mixed
381
-     */
382
-    public function getGongMerProfit()
383
-    {
384
-        return $this->gongMerProfit;
385
-    }
386
-
387
-    /**
388
-     * @param mixed $gongMerProfit
389
-     * @return ProductAttrValueEntity
390
-     */
391
-    public function setGongMerProfit($gongMerProfit)
392
-    {
393
-        $this->gongMerProfit = $gongMerProfit;
394
-        return $this;
395
-    }
396
-
397
-    /**
398
-     * @return mixed
399
-     */
400
-    public function getGongPension()
401
-    {
402
-        return $this->gongPension;
403
-    }
404
-
405
-    /**
406
-     * @param mixed $gongPension
407
-     * @return ProductAttrValueEntity
408
-     */
409
-    public function setGongPension($gongPension)
410
-    {
411
-        $this->gongPension = $gongPension;
412
-        return $this;
413
-    }
414
-
415
-    /**
416
-     * @return mixed
417
-     */
418
-    public function getGongMarketPrice()
419
-    {
420
-        return $this->gongMarketPrice;
421
-    }
422
-
423
-    /**
424
-     * @param mixed $gongMarketPrice
425
-     * @return ProductAttrValueEntity
426
-     */
427
-    public function setGongMarketPrice($gongMarketPrice)
428
-    {
429
-        $this->gongMarketPrice = $gongMarketPrice;
430
-        return $this;
431
-    }
432
-
433
-    /**
434
-     * @return mixed
435
-     */
436
-    public function getPlateMerProfit()
437
-    {
438
-        return $this->plateMerProfit;
439
-    }
440
-
441
-    /**
442
-     * @param mixed $plateMerProfit
443
-     * @return ProductAttrValueEntity
444
-     */
445
-    public function setPlateMerProfit($plateMerProfit)
446
-    {
447
-        $this->plateMerProfit = $plateMerProfit;
448
-        return $this;
449
-    }
450
-
451
-    /**
452
-     * @return string
453
-     */
454
-    public function getPensionNum(): string
455
-    {
456
-        return $this->pensionNum;
457
-    }
458
-
459
-    /**
460
-     * @param string $pensionNum
461
-     * @return ProductAttrValueEntity
462
-     */
463
-    public function setPensionNum(string $pensionNum): ProductAttrValueEntity
464
-    {
465
-        $this->pensionNum = $pensionNum;
466
-        return $this;
467
-    }
468
-
469
-    /**
470
-     * @return string
471
-     */
472
-    public function getShareNum(): string
473
-    {
474
-        return $this->shareNum;
475
-    }
476
-
477
-    /**
478
-     * @param string $shareNum
479
-     * @return ProductAttrValueEntity
480
-     */
481
-    public function setShareNum(string $shareNum): ProductAttrValueEntity
482
-    {
483
-        $this->shareNum = $shareNum;
484
-        return $this;
485
-    }
486
-
487
-    /**
488
-     * @return string
489
-     */
490
-    public function getStockNum(): string
491
-    {
492
-        return $this->stockNum;
493
-    }
494
-
495
-    /**
496
-     * @param string $stockNum
497
-     * @return ProductAttrValueEntity
498
-     */
499
-    public function setStockNum(string $stockNum): ProductAttrValueEntity
500
-    {
501
-        $this->stockNum = $stockNum;
502
-        return $this;
503
-    }
504
-
505
-    /**
506
-     * @return string
507
-     */
508
-    public function getSharesNum(): string
509
-    {
510
-        return $this->sharesNum;
511
-    }
512
-
513
-    /**
514
-     * @param string $sharesNum
515
-     * @return ProductAttrValueEntity
516
-     */
517
-    public function setSharesNum(string $sharesNum): ProductAttrValueEntity
518
-    {
519
-        $this->sharesNum = $sharesNum;
520
-        return $this;
521
-    }
522
-}

+ 0 - 865
app/entity/data/store/ProductEntity.php

@@ -1,865 +0,0 @@
1
-<?php
2
-
3
-namespace app\entity\data\store;
4
-
5
-use app\entity\data\DataEntity;
6
-
7
-class ProductEntity extends DataEntity
8
-{
9
-    public $productId = 0;  // 商品id
10
-    public $merId = 0;  // 商户Id
11
-    public $image = '';  // 商品图片
12
-    public $sliderImage = '';  // 轮播图
13
-    public $storeName = '';  // 商品名称
14
-    public $storeInfo = '';  // 商品简介
15
-    public $keyword = '';  // 关键字
16
-    public $barCode = '';  // 产品条码(一维码)
17
-    public $brandId = null;  // 品牌 id
18
-    public $isShow = 1;  // 商户状态(0:未上架,1:上架)
19
-    public $status = 0;  // 管理员状态(0:审核中,1:审核通过 -1: 未通过 -2: 下架)
20
-    public $isDel = 0;  // 是否删除
21
-    public $cateId = 0;  // 分类id
22
-    public $unitName = '';  // 单位名
23
-    public $sort = 0;  // 排序
24
-    public $rank = 0;  // 总后台排序
25
-    public $sales = 0;  // 销量
26
-    public $price = null;  // 最低价格
27
-    public $cost = null;  // 成本价
28
-    public $otPrice = null;  // 原价
29
-    public $stock = 0;  // 总库存
30
-    public $isHot = 0;  // 是否热卖
31
-    public $isBenefit = 0;  // 促销单品
32
-    public $isBest = 0;  // 是否精品
33
-    public $isNew = 0;  // 是否新品
34
-    public $isGood = 0;  // 是否优品推荐
35
-    public $productType = 0;  // 0.普通商品 1.秒杀商品
36
-    public $ficti = 100;  // 虚拟销量
37
-    public $browse = 0;  // 浏览量
38
-    public $codePath = '';  // 产品二维码地址(用户小程序海报)
39
-    public $videoLink = '';  // 主图视频链接
40
-    public $tempId = 1;  // 运费模板ID
41
-    public $specType = 0;  // 规格 0单 1多
42
-    public $extensionType = 0;  // 佣金比例 0.系统,1.自定义
43
-    public $refusal = null;  // 审核拒绝理由
44
-    public $rate = 5;  // 评价分数
45
-    public $replyCount = 0;  // 评论数
46
-    public $merStatus = 1;  // 商铺状态是否 1.正常 0. 非正常
47
-    public $giveCouponIds = null;  // 赠送优惠券
48
-    public $isGiftBag = 0;  // 是否为礼包
49
-    public $createTime = null;  // 添加时间
50
-    public $careCount = null;  // 收藏数
51
-    public $isUsed = 1;  // 显示/隐藏
52
-    public $oldProductId = 0;  // 原商品ID
53
-    public $volunteer = 0;  // 志愿者商品
54
-    public $type = 1;  // 商品类型:1:普通商品。2:爆款商品。3:消费积分商品
55
-    public $pension = null;  // 养老金(非百分比)特定商品类型可用
56
-    public $commission = '0';  // 返佣(百分比)特定类型商品可用
57
-    public $dcId = 0;  // 所属大仓ID
58
-    public $dcPrice = null;  // 大仓价格
59
-    public $seckill = 0;  // 是否秒杀 1是 0不是
60
-    public $isHide = 0;  // 秒杀 1不显示 0显示
61
-    public $spuId = null;  // 供应链商品ID
62
-    public $costPrice = null;  // 成本价格
63
-    public $gongSkuId = null;  // 供应商SKU ID
64
-    public $plateMerProfit = null;  // 平台创客利润
65
-    public $yanglaojinScale = null;  // 养老金比例:养老金/销售价
66
-    public $pensionIs = 0;  // 养老金单独设置是否开启 0-不开 1-开
67
-    public $shareIs = 0;  // 分享奖单独设置是否开启 0-不开 1-开
68
-    public $concessionPri = 0.00;  // 商品分润(商家让利)
69
-    public $argument = null;  // 下架说明理由
70
-    public $isStatus = 0;  // 0系统下架 1手动下架
71
-
72
-    public function getProductId(): int
73
-    {
74
-        return $this->productId;
75
-    }
76
-
77
-    public function setProductId(int $productId): ProductEntity
78
-    {
79
-        $this->productId = $productId;
80
-        return $this;
81
-    }
82
-
83
-    public function getMerId(): int
84
-    {
85
-        return $this->merId;
86
-    }
87
-
88
-    public function setMerId(int $merId): ProductEntity
89
-    {
90
-        $this->merId = $merId;
91
-        return $this;
92
-    }
93
-
94
-    public function getImage(): string
95
-    {
96
-        return $this->image;
97
-    }
98
-
99
-    public function setImage(string $image): ProductEntity
100
-    {
101
-        $this->image = $image;
102
-        return $this;
103
-    }
104
-
105
-    public function getSliderImage(): string
106
-    {
107
-        return $this->sliderImage;
108
-    }
109
-
110
-    public function setSliderImage(string $sliderImage): ProductEntity
111
-    {
112
-        $this->sliderImage = $sliderImage;
113
-        return $this;
114
-    }
115
-
116
-    public function getStoreName(): string
117
-    {
118
-        return $this->storeName;
119
-    }
120
-
121
-    public function setStoreName(string $storeName): ProductEntity
122
-    {
123
-        $this->storeName = $storeName;
124
-        return $this;
125
-    }
126
-
127
-    public function getStoreInfo(): string
128
-    {
129
-        return $this->storeInfo;
130
-    }
131
-
132
-    public function setStoreInfo(string $storeInfo): ProductEntity
133
-    {
134
-        $this->storeInfo = $storeInfo;
135
-        return $this;
136
-    }
137
-
138
-    public function getKeyword(): string
139
-    {
140
-        return $this->keyword;
141
-    }
142
-
143
-    public function setKeyword(string $keyword): ProductEntity
144
-    {
145
-        $this->keyword = $keyword;
146
-        return $this;
147
-    }
148
-
149
-    public function getBarCode(): string
150
-    {
151
-        return $this->barCode;
152
-    }
153
-
154
-    public function setBarCode(string $barCode): ProductEntity
155
-    {
156
-        $this->barCode = $barCode;
157
-        return $this;
158
-    }
159
-
160
-    /**
161
-     * @return mixed
162
-     */
163
-    public function getBrandId()
164
-    {
165
-        return $this->brandId;
166
-    }
167
-
168
-    /**
169
-     * @param mixed $brandId
170
-     * @return ProductEntity
171
-     */
172
-    public function setBrandId($brandId)
173
-    {
174
-        $this->brandId = $brandId;
175
-        return $this;
176
-    }
177
-
178
-    public function getIsShow(): int
179
-    {
180
-        return $this->isShow;
181
-    }
182
-
183
-    public function setIsShow(int $isShow): ProductEntity
184
-    {
185
-        $this->isShow = $isShow;
186
-        return $this;
187
-    }
188
-
189
-    public function getStatus(): int
190
-    {
191
-        return $this->status;
192
-    }
193
-
194
-    public function setStatus(int $status): ProductEntity
195
-    {
196
-        $this->status = $status;
197
-        return $this;
198
-    }
199
-
200
-    public function getIsDel(): int
201
-    {
202
-        return $this->isDel;
203
-    }
204
-
205
-    public function setIsDel(int $isDel): ProductEntity
206
-    {
207
-        $this->isDel = $isDel;
208
-        return $this;
209
-    }
210
-
211
-    public function getCateId(): int
212
-    {
213
-        return $this->cateId;
214
-    }
215
-
216
-    public function setCateId(int $cateId): ProductEntity
217
-    {
218
-        $this->cateId = $cateId;
219
-        return $this;
220
-    }
221
-
222
-    public function getUnitName(): string
223
-    {
224
-        return $this->unitName;
225
-    }
226
-
227
-    public function setUnitName(string $unitName): ProductEntity
228
-    {
229
-        $this->unitName = $unitName;
230
-        return $this;
231
-    }
232
-
233
-    public function getSort(): int
234
-    {
235
-        return $this->sort;
236
-    }
237
-
238
-    public function setSort(int $sort): ProductEntity
239
-    {
240
-        $this->sort = $sort;
241
-        return $this;
242
-    }
243
-
244
-    public function getRank(): int
245
-    {
246
-        return $this->rank;
247
-    }
248
-
249
-    public function setRank(int $rank): ProductEntity
250
-    {
251
-        $this->rank = $rank;
252
-        return $this;
253
-    }
254
-
255
-    public function getSales(): int
256
-    {
257
-        return $this->sales;
258
-    }
259
-
260
-    public function setSales(int $sales): ProductEntity
261
-    {
262
-        $this->sales = $sales;
263
-        return $this;
264
-    }
265
-
266
-    /**
267
-     * @return mixed
268
-     */
269
-    public function getPrice()
270
-    {
271
-        return $this->price;
272
-    }
273
-
274
-    /**
275
-     * @param mixed $price
276
-     * @return ProductEntity
277
-     */
278
-    public function setPrice($price)
279
-    {
280
-        $this->price = $price;
281
-        return $this;
282
-    }
283
-
284
-    /**
285
-     * @return mixed
286
-     */
287
-    public function getCost()
288
-    {
289
-        return $this->cost;
290
-    }
291
-
292
-    /**
293
-     * @param mixed $cost
294
-     * @return ProductEntity
295
-     */
296
-    public function setCost($cost)
297
-    {
298
-        $this->cost = $cost;
299
-        return $this;
300
-    }
301
-
302
-    /**
303
-     * @return mixed
304
-     */
305
-    public function getOtPrice()
306
-    {
307
-        return $this->otPrice;
308
-    }
309
-
310
-    /**
311
-     * @param mixed $otPrice
312
-     * @return ProductEntity
313
-     */
314
-    public function setOtPrice($otPrice)
315
-    {
316
-        $this->otPrice = $otPrice;
317
-        return $this;
318
-    }
319
-
320
-    public function getStock(): int
321
-    {
322
-        return $this->stock;
323
-    }
324
-
325
-    public function setStock(int $stock): ProductEntity
326
-    {
327
-        $this->stock = $stock;
328
-        return $this;
329
-    }
330
-
331
-    public function getIsHot(): int
332
-    {
333
-        return $this->isHot;
334
-    }
335
-
336
-    public function setIsHot(int $isHot): ProductEntity
337
-    {
338
-        $this->isHot = $isHot;
339
-        return $this;
340
-    }
341
-
342
-    public function getIsBenefit(): int
343
-    {
344
-        return $this->isBenefit;
345
-    }
346
-
347
-    public function setIsBenefit(int $isBenefit): ProductEntity
348
-    {
349
-        $this->isBenefit = $isBenefit;
350
-        return $this;
351
-    }
352
-
353
-    public function getIsBest(): int
354
-    {
355
-        return $this->isBest;
356
-    }
357
-
358
-    public function setIsBest(int $isBest): ProductEntity
359
-    {
360
-        $this->isBest = $isBest;
361
-        return $this;
362
-    }
363
-
364
-    public function getIsNew(): int
365
-    {
366
-        return $this->isNew;
367
-    }
368
-
369
-    public function setIsNew(int $isNew): ProductEntity
370
-    {
371
-        $this->isNew = $isNew;
372
-        return $this;
373
-    }
374
-
375
-    public function getIsGood(): int
376
-    {
377
-        return $this->isGood;
378
-    }
379
-
380
-    public function setIsGood(int $isGood): ProductEntity
381
-    {
382
-        $this->isGood = $isGood;
383
-        return $this;
384
-    }
385
-
386
-    public function getProductType(): int
387
-    {
388
-        return $this->productType;
389
-    }
390
-
391
-    public function setProductType(int $productType): ProductEntity
392
-    {
393
-        $this->productType = $productType;
394
-        return $this;
395
-    }
396
-
397
-    public function getFicti(): int
398
-    {
399
-        return $this->ficti;
400
-    }
401
-
402
-    public function setFicti(int $ficti): ProductEntity
403
-    {
404
-        $this->ficti = $ficti;
405
-        return $this;
406
-    }
407
-
408
-    public function getBrowse(): int
409
-    {
410
-        return $this->browse;
411
-    }
412
-
413
-    public function setBrowse(int $browse): ProductEntity
414
-    {
415
-        $this->browse = $browse;
416
-        return $this;
417
-    }
418
-
419
-    public function getCodePath(): string
420
-    {
421
-        return $this->codePath;
422
-    }
423
-
424
-    public function setCodePath(string $codePath): ProductEntity
425
-    {
426
-        $this->codePath = $codePath;
427
-        return $this;
428
-    }
429
-
430
-    public function getVideoLink(): string
431
-    {
432
-        return $this->videoLink;
433
-    }
434
-
435
-    public function setVideoLink(string $videoLink): ProductEntity
436
-    {
437
-        $this->videoLink = $videoLink;
438
-        return $this;
439
-    }
440
-
441
-    public function getTempId(): int
442
-    {
443
-        return $this->tempId;
444
-    }
445
-
446
-    public function setTempId(int $tempId): ProductEntity
447
-    {
448
-        $this->tempId = $tempId;
449
-        return $this;
450
-    }
451
-
452
-    public function getSpecType(): int
453
-    {
454
-        return $this->specType;
455
-    }
456
-
457
-    public function setSpecType(int $specType): ProductEntity
458
-    {
459
-        $this->specType = $specType;
460
-        return $this;
461
-    }
462
-
463
-    public function getExtensionType(): int
464
-    {
465
-        return $this->extensionType;
466
-    }
467
-
468
-    public function setExtensionType(int $extensionType): ProductEntity
469
-    {
470
-        $this->extensionType = $extensionType;
471
-        return $this;
472
-    }
473
-
474
-    /**
475
-     * @return mixed
476
-     */
477
-    public function getRefusal()
478
-    {
479
-        return $this->refusal;
480
-    }
481
-
482
-    /**
483
-     * @param mixed $refusal
484
-     * @return ProductEntity
485
-     */
486
-    public function setRefusal($refusal)
487
-    {
488
-        $this->refusal = $refusal;
489
-        return $this;
490
-    }
491
-
492
-    public function getRate(): int
493
-    {
494
-        return $this->rate;
495
-    }
496
-
497
-    public function setRate(int $rate): ProductEntity
498
-    {
499
-        $this->rate = $rate;
500
-        return $this;
501
-    }
502
-
503
-    public function getReplyCount(): int
504
-    {
505
-        return $this->replyCount;
506
-    }
507
-
508
-    public function setReplyCount(int $replyCount): ProductEntity
509
-    {
510
-        $this->replyCount = $replyCount;
511
-        return $this;
512
-    }
513
-
514
-    public function getMerStatus(): int
515
-    {
516
-        return $this->merStatus;
517
-    }
518
-
519
-    public function setMerStatus(int $merStatus): ProductEntity
520
-    {
521
-        $this->merStatus = $merStatus;
522
-        return $this;
523
-    }
524
-
525
-    /**
526
-     * @return mixed
527
-     */
528
-    public function getGiveCouponIds()
529
-    {
530
-        return $this->giveCouponIds;
531
-    }
532
-
533
-    /**
534
-     * @param mixed $giveCouponIds
535
-     * @return ProductEntity
536
-     */
537
-    public function setGiveCouponIds($giveCouponIds)
538
-    {
539
-        $this->giveCouponIds = $giveCouponIds;
540
-        return $this;
541
-    }
542
-
543
-    public function getIsGiftBag(): int
544
-    {
545
-        return $this->isGiftBag;
546
-    }
547
-
548
-    public function setIsGiftBag(int $isGiftBag): ProductEntity
549
-    {
550
-        $this->isGiftBag = $isGiftBag;
551
-        return $this;
552
-    }
553
-
554
-    /**
555
-     * @return mixed
556
-     */
557
-    public function getCreateTime()
558
-    {
559
-        return $this->createTime;
560
-    }
561
-
562
-    /**
563
-     * @param mixed $createTime
564
-     * @return ProductEntity
565
-     */
566
-    public function setCreateTime($createTime)
567
-    {
568
-        $this->createTime = $createTime;
569
-        return $this;
570
-    }
571
-
572
-    /**
573
-     * @return mixed
574
-     */
575
-    public function getCareCount()
576
-    {
577
-        return $this->careCount;
578
-    }
579
-
580
-    /**
581
-     * @param mixed $careCount
582
-     * @return ProductEntity
583
-     */
584
-    public function setCareCount($careCount)
585
-    {
586
-        $this->careCount = $careCount;
587
-        return $this;
588
-    }
589
-
590
-    public function getIsUsed(): int
591
-    {
592
-        return $this->isUsed;
593
-    }
594
-
595
-    public function setIsUsed(int $isUsed): ProductEntity
596
-    {
597
-        $this->isUsed = $isUsed;
598
-        return $this;
599
-    }
600
-
601
-    public function getOldProductId(): int
602
-    {
603
-        return $this->oldProductId;
604
-    }
605
-
606
-    public function setOldProductId(int $oldProductId): ProductEntity
607
-    {
608
-        $this->oldProductId = $oldProductId;
609
-        return $this;
610
-    }
611
-
612
-    public function getVolunteer(): int
613
-    {
614
-        return $this->volunteer;
615
-    }
616
-
617
-    public function setVolunteer(int $volunteer): ProductEntity
618
-    {
619
-        $this->volunteer = $volunteer;
620
-        return $this;
621
-    }
622
-
623
-    public function getType(): int
624
-    {
625
-        return $this->type;
626
-    }
627
-
628
-    public function setType(int $type): ProductEntity
629
-    {
630
-        $this->type = $type;
631
-        return $this;
632
-    }
633
-
634
-    /**
635
-     * @return mixed
636
-     */
637
-    public function getPension()
638
-    {
639
-        return $this->pension;
640
-    }
641
-
642
-    /**
643
-     * @param mixed $pension
644
-     * @return ProductEntity
645
-     */
646
-    public function setPension($pension)
647
-    {
648
-        $this->pension = $pension;
649
-        return $this;
650
-    }
651
-
652
-    public function getCommission(): string
653
-    {
654
-        return $this->commission;
655
-    }
656
-
657
-    public function setCommission(string $commission): ProductEntity
658
-    {
659
-        $this->commission = $commission;
660
-        return $this;
661
-    }
662
-
663
-    public function getDcId(): int
664
-    {
665
-        return $this->dcId;
666
-    }
667
-
668
-    public function setDcId(int $dcId): ProductEntity
669
-    {
670
-        $this->dcId = $dcId;
671
-        return $this;
672
-    }
673
-
674
-    /**
675
-     * @return mixed
676
-     */
677
-    public function getDcPrice()
678
-    {
679
-        return $this->dcPrice;
680
-    }
681
-
682
-    /**
683
-     * @param mixed $dcPrice
684
-     * @return ProductEntity
685
-     */
686
-    public function setDcPrice($dcPrice)
687
-    {
688
-        $this->dcPrice = $dcPrice;
689
-        return $this;
690
-    }
691
-
692
-    public function getSeckill(): int
693
-    {
694
-        return $this->seckill;
695
-    }
696
-
697
-    public function setSeckill(int $seckill): ProductEntity
698
-    {
699
-        $this->seckill = $seckill;
700
-        return $this;
701
-    }
702
-
703
-    public function getIsHide(): int
704
-    {
705
-        return $this->isHide;
706
-    }
707
-
708
-    public function setIsHide(int $isHide): ProductEntity
709
-    {
710
-        $this->isHide = $isHide;
711
-        return $this;
712
-    }
713
-
714
-    /**
715
-     * @return mixed
716
-     */
717
-    public function getSpuId()
718
-    {
719
-        return $this->spuId;
720
-    }
721
-
722
-    /**
723
-     * @param mixed $spuId
724
-     * @return ProductEntity
725
-     */
726
-    public function setSpuId($spuId)
727
-    {
728
-        $this->spuId = $spuId;
729
-        return $this;
730
-    }
731
-
732
-    /**
733
-     * @return mixed
734
-     */
735
-    public function getCostPrice()
736
-    {
737
-        return $this->costPrice;
738
-    }
739
-
740
-    /**
741
-     * @param mixed $costPrice
742
-     * @return ProductEntity
743
-     */
744
-    public function setCostPrice($costPrice)
745
-    {
746
-        $this->costPrice = $costPrice;
747
-        return $this;
748
-    }
749
-
750
-    /**
751
-     * @return mixed
752
-     */
753
-    public function getGongSkuId()
754
-    {
755
-        return $this->gongSkuId;
756
-    }
757
-
758
-    /**
759
-     * @param mixed $gongSkuId
760
-     * @return ProductEntity
761
-     */
762
-    public function setGongSkuId($gongSkuId)
763
-    {
764
-        $this->gongSkuId = $gongSkuId;
765
-        return $this;
766
-    }
767
-
768
-    /**
769
-     * @return mixed
770
-     */
771
-    public function getPlateMerProfit()
772
-    {
773
-        return $this->plateMerProfit;
774
-    }
775
-
776
-    /**
777
-     * @param mixed $plateMerProfit
778
-     * @return ProductEntity
779
-     */
780
-    public function setPlateMerProfit($plateMerProfit)
781
-    {
782
-        $this->plateMerProfit = $plateMerProfit;
783
-        return $this;
784
-    }
785
-
786
-    /**
787
-     * @return mixed
788
-     */
789
-    public function getYanglaojinScale()
790
-    {
791
-        return $this->yanglaojinScale;
792
-    }
793
-
794
-    /**
795
-     * @param mixed $yanglaojinScale
796
-     * @return ProductEntity
797
-     */
798
-    public function setYanglaojinScale($yanglaojinScale)
799
-    {
800
-        $this->yanglaojinScale = $yanglaojinScale;
801
-        return $this;
802
-    }
803
-
804
-    public function getPensionIs(): int
805
-    {
806
-        return $this->pensionIs;
807
-    }
808
-
809
-    public function setPensionIs(int $pensionIs): ProductEntity
810
-    {
811
-        $this->pensionIs = $pensionIs;
812
-        return $this;
813
-    }
814
-
815
-    public function getShareIs(): int
816
-    {
817
-        return $this->shareIs;
818
-    }
819
-
820
-    public function setShareIs(int $shareIs): ProductEntity
821
-    {
822
-        $this->shareIs = $shareIs;
823
-        return $this;
824
-    }
825
-
826
-    public function getConcessionPri(): float
827
-    {
828
-        return $this->concessionPri;
829
-    }
830
-
831
-    public function setConcessionPri(float $concessionPri): ProductEntity
832
-    {
833
-        $this->concessionPri = $concessionPri;
834
-        return $this;
835
-    }
836
-
837
-    /**
838
-     * @return mixed
839
-     */
840
-    public function getArgument()
841
-    {
842
-        return $this->argument;
843
-    }
844
-
845
-    /**
846
-     * @param mixed $argument
847
-     * @return ProductEntity
848
-     */
849
-    public function setArgument($argument)
850
-    {
851
-        $this->argument = $argument;
852
-        return $this;
853
-    }
854
-
855
-    public function getIsStatus(): int
856
-    {
857
-        return $this->isStatus;
858
-    }
859
-
860
-    public function setIsStatus(int $isStatus): ProductEntity
861
-    {
862
-        $this->isStatus = $isStatus;
863
-        return $this;
864
-    }
865
-}

+ 115 - 114
app/entity/data/store/StoreGroupOrderEntity.php

@@ -6,299 +6,299 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class StoreGroupOrderEntity extends DataEntity
8 8
 {
9
-    public $groupOrderId = 0;  // 订单ID
10
-    public $groupOrderSn = '';  // 订单号
11
-    public $uid = 0;  // 用户ID
12
-    public $totalPostage = 0.00;  // 邮费
13
-    public $totalPrice = 0.00;  // 订单总额
14
-    public $totalNum = 0;  // 商品数
15
-    public $couponPrice = 0.00;  // 优惠金额
16
-    public $realName = '';  // 联系人
17
-    public $userPhone = '';  // 联系电话
18
-    public $userAddress = '';  // 收货地址
19
-    public $payPrice = 0.00;  // 支付金额
20
-    public $payPostage = 0.00;  // 支付邮费
21
-    public $cost = 0.00;  // 成本价
22
-    public $giveCouponIds = '';  // 赠送优惠券
23
-    public $paid = 0;  // 是否支付
9
+    public $groupOrderId = null;  // 订单组id
10
+    public $groupOrderSn = null;  // 订单号
11
+    public $uid = null;  // 用户id
12
+    public $totalPostage = null;  // 邮费
13
+    public $totalPrice = null;  // 订单总额
14
+    public $totalNum = null;  // 商品数
15
+    public $couponPrice = null;  // 优惠金额
16
+    public $realName = null;  // 联系人
17
+    public $userPhone = null;  // 联系电话
18
+    public $userAddress = null;  // 收货地址
19
+    public $payPrice = null;  // 支付金额
20
+    public $payPostage = null;  // 支付邮费
21
+    public $cost = null;  // 成本价
22
+    public $giveCouponIds = null;  // 赠送优惠券
23
+    public $paid = null;  // 是否支付
24 24
     public $payTime = null;  // 支付时间
25
-    public $payType = 0;  // 支付方式
25
+    public $payType = null;  // 支付方式
26 26
     public $createTime = null;  // 创建时间
27
-    public $isRemind = 0;  // 是否提醒
28
-    public $isDel = 0;  // 是否删除
29
-    public $rand = '';  // 订单号随机数
27
+    public $isRemind = null;  // 是否提醒
28
+    public $isDel = null;  // 是否删除
29
+    public $rand = null;  // 订单号随机数
30 30
     public $split = null;  // 分账状态
31
-    public $serialNumber = '';  // 首信易交易流水号
32
-    public $testOrder = 0;  // 是否为测试订单
33
-    public $hfPayId = '';  // 汇付订单id
31
+    public $serialNumber = null;  // 首信易交易流水号
32
+    public $testOrder = null;  // 测试订单
33
+    public $hfPayId = null;  // 汇付订单id
34 34
     public $payWx = null;  // 微信支付渠道后台设置
35
-    public $fzonePaytype = '';  // 组合支付
35
+    public $fzonePaytype = null;
36 36
 
37 37
     /**
38
-     * @return int
38
+     * @return mixed
39 39
      */
40
-    public function getGroupOrderId(): int
40
+    public function getGroupOrderId()
41 41
     {
42 42
         return $this->groupOrderId;
43 43
     }
44 44
 
45 45
     /**
46
-     * @param int $groupOrderId
46
+     * @param mixed $groupOrderId
47 47
      * @return StoreGroupOrderEntity
48 48
      */
49
-    public function setGroupOrderId(int $groupOrderId): StoreGroupOrderEntity
49
+    public function setGroupOrderId($groupOrderId): StoreGroupOrderEntity
50 50
     {
51 51
         $this->groupOrderId = $groupOrderId;
52 52
         return $this;
53 53
     }
54 54
 
55 55
     /**
56
-     * @return string
56
+     * @return mixed
57 57
      */
58
-    public function getGroupOrderSn(): string
58
+    public function getGroupOrderSn()
59 59
     {
60 60
         return $this->groupOrderSn;
61 61
     }
62 62
 
63 63
     /**
64
-     * @param string $groupOrderSn
64
+     * @param mixed $groupOrderSn
65 65
      * @return StoreGroupOrderEntity
66 66
      */
67
-    public function setGroupOrderSn(string $groupOrderSn): StoreGroupOrderEntity
67
+    public function setGroupOrderSn($groupOrderSn): StoreGroupOrderEntity
68 68
     {
69 69
         $this->groupOrderSn = $groupOrderSn;
70 70
         return $this;
71 71
     }
72 72
 
73 73
     /**
74
-     * @return int
74
+     * @return mixed
75 75
      */
76
-    public function getUid(): int
76
+    public function getUid()
77 77
     {
78 78
         return $this->uid;
79 79
     }
80 80
 
81 81
     /**
82
-     * @param int $uid
82
+     * @param mixed $uid
83 83
      * @return StoreGroupOrderEntity
84 84
      */
85
-    public function setUid(int $uid): StoreGroupOrderEntity
85
+    public function setUid($uid): StoreGroupOrderEntity
86 86
     {
87 87
         $this->uid = $uid;
88 88
         return $this;
89 89
     }
90 90
 
91 91
     /**
92
-     * @return float
92
+     * @return mixed
93 93
      */
94
-    public function getTotalPostage(): float
94
+    public function getTotalPostage()
95 95
     {
96 96
         return $this->totalPostage;
97 97
     }
98 98
 
99 99
     /**
100
-     * @param float $totalPostage
100
+     * @param mixed $totalPostage
101 101
      * @return StoreGroupOrderEntity
102 102
      */
103
-    public function setTotalPostage(float $totalPostage): StoreGroupOrderEntity
103
+    public function setTotalPostage($totalPostage): StoreGroupOrderEntity
104 104
     {
105 105
         $this->totalPostage = $totalPostage;
106 106
         return $this;
107 107
     }
108 108
 
109 109
     /**
110
-     * @return float
110
+     * @return mixed
111 111
      */
112
-    public function getTotalPrice(): float
112
+    public function getTotalPrice()
113 113
     {
114 114
         return $this->totalPrice;
115 115
     }
116 116
 
117 117
     /**
118
-     * @param float $totalPrice
118
+     * @param mixed $totalPrice
119 119
      * @return StoreGroupOrderEntity
120 120
      */
121
-    public function setTotalPrice(float $totalPrice): StoreGroupOrderEntity
121
+    public function setTotalPrice($totalPrice): StoreGroupOrderEntity
122 122
     {
123 123
         $this->totalPrice = $totalPrice;
124 124
         return $this;
125 125
     }
126 126
 
127 127
     /**
128
-     * @return int
128
+     * @return mixed
129 129
      */
130
-    public function getTotalNum(): int
130
+    public function getTotalNum()
131 131
     {
132 132
         return $this->totalNum;
133 133
     }
134 134
 
135 135
     /**
136
-     * @param int $totalNum
136
+     * @param mixed $totalNum
137 137
      * @return StoreGroupOrderEntity
138 138
      */
139
-    public function setTotalNum(int $totalNum): StoreGroupOrderEntity
139
+    public function setTotalNum($totalNum): StoreGroupOrderEntity
140 140
     {
141 141
         $this->totalNum = $totalNum;
142 142
         return $this;
143 143
     }
144 144
 
145 145
     /**
146
-     * @return float
146
+     * @return mixed
147 147
      */
148
-    public function getCouponPrice(): float
148
+    public function getCouponPrice()
149 149
     {
150 150
         return $this->couponPrice;
151 151
     }
152 152
 
153 153
     /**
154
-     * @param float $couponPrice
154
+     * @param mixed $couponPrice
155 155
      * @return StoreGroupOrderEntity
156 156
      */
157
-    public function setCouponPrice(float $couponPrice): StoreGroupOrderEntity
157
+    public function setCouponPrice($couponPrice): StoreGroupOrderEntity
158 158
     {
159 159
         $this->couponPrice = $couponPrice;
160 160
         return $this;
161 161
     }
162 162
 
163 163
     /**
164
-     * @return string
164
+     * @return mixed
165 165
      */
166
-    public function getRealName(): string
166
+    public function getRealName()
167 167
     {
168 168
         return $this->realName;
169 169
     }
170 170
 
171 171
     /**
172
-     * @param string $realName
172
+     * @param mixed $realName
173 173
      * @return StoreGroupOrderEntity
174 174
      */
175
-    public function setRealName(string $realName): StoreGroupOrderEntity
175
+    public function setRealName($realName): StoreGroupOrderEntity
176 176
     {
177 177
         $this->realName = $realName;
178 178
         return $this;
179 179
     }
180 180
 
181 181
     /**
182
-     * @return string
182
+     * @return mixed
183 183
      */
184
-    public function getUserPhone(): string
184
+    public function getUserPhone()
185 185
     {
186 186
         return $this->userPhone;
187 187
     }
188 188
 
189 189
     /**
190
-     * @param string $userPhone
190
+     * @param mixed $userPhone
191 191
      * @return StoreGroupOrderEntity
192 192
      */
193
-    public function setUserPhone(string $userPhone): StoreGroupOrderEntity
193
+    public function setUserPhone($userPhone): StoreGroupOrderEntity
194 194
     {
195 195
         $this->userPhone = $userPhone;
196 196
         return $this;
197 197
     }
198 198
 
199 199
     /**
200
-     * @return string
200
+     * @return mixed
201 201
      */
202
-    public function getUserAddress(): string
202
+    public function getUserAddress()
203 203
     {
204 204
         return $this->userAddress;
205 205
     }
206 206
 
207 207
     /**
208
-     * @param string $userAddress
208
+     * @param mixed $userAddress
209 209
      * @return StoreGroupOrderEntity
210 210
      */
211
-    public function setUserAddress(string $userAddress): StoreGroupOrderEntity
211
+    public function setUserAddress($userAddress): StoreGroupOrderEntity
212 212
     {
213 213
         $this->userAddress = $userAddress;
214 214
         return $this;
215 215
     }
216 216
 
217 217
     /**
218
-     * @return float
218
+     * @return mixed
219 219
      */
220
-    public function getPayPrice(): float
220
+    public function getPayPrice()
221 221
     {
222 222
         return $this->payPrice;
223 223
     }
224 224
 
225 225
     /**
226
-     * @param float $payPrice
226
+     * @param mixed $payPrice
227 227
      * @return StoreGroupOrderEntity
228 228
      */
229
-    public function setPayPrice(float $payPrice): StoreGroupOrderEntity
229
+    public function setPayPrice($payPrice): StoreGroupOrderEntity
230 230
     {
231 231
         $this->payPrice = $payPrice;
232 232
         return $this;
233 233
     }
234 234
 
235 235
     /**
236
-     * @return float
236
+     * @return mixed
237 237
      */
238
-    public function getPayPostage(): float
238
+    public function getPayPostage()
239 239
     {
240 240
         return $this->payPostage;
241 241
     }
242 242
 
243 243
     /**
244
-     * @param float $payPostage
244
+     * @param mixed $payPostage
245 245
      * @return StoreGroupOrderEntity
246 246
      */
247
-    public function setPayPostage(float $payPostage): StoreGroupOrderEntity
247
+    public function setPayPostage($payPostage): StoreGroupOrderEntity
248 248
     {
249 249
         $this->payPostage = $payPostage;
250 250
         return $this;
251 251
     }
252 252
 
253 253
     /**
254
-     * @return float
254
+     * @return mixed
255 255
      */
256
-    public function getCost(): float
256
+    public function getCost()
257 257
     {
258 258
         return $this->cost;
259 259
     }
260 260
 
261 261
     /**
262
-     * @param float $cost
262
+     * @param mixed $cost
263 263
      * @return StoreGroupOrderEntity
264 264
      */
265
-    public function setCost(float $cost): StoreGroupOrderEntity
265
+    public function setCost($cost): StoreGroupOrderEntity
266 266
     {
267 267
         $this->cost = $cost;
268 268
         return $this;
269 269
     }
270 270
 
271 271
     /**
272
-     * @return string
272
+     * @return mixed
273 273
      */
274
-    public function getGiveCouponIds(): string
274
+    public function getGiveCouponIds()
275 275
     {
276 276
         return $this->giveCouponIds;
277 277
     }
278 278
 
279 279
     /**
280
-     * @param string $giveCouponIds
280
+     * @param mixed $giveCouponIds
281 281
      * @return StoreGroupOrderEntity
282 282
      */
283
-    public function setGiveCouponIds(string $giveCouponIds): StoreGroupOrderEntity
283
+    public function setGiveCouponIds($giveCouponIds): StoreGroupOrderEntity
284 284
     {
285 285
         $this->giveCouponIds = $giveCouponIds;
286 286
         return $this;
287 287
     }
288 288
 
289 289
     /**
290
-     * @return int
290
+     * @return mixed
291 291
      */
292
-    public function getPaid(): int
292
+    public function getPaid()
293 293
     {
294 294
         return $this->paid;
295 295
     }
296 296
 
297 297
     /**
298
-     * @param int $paid
298
+     * @param mixed $paid
299 299
      * @return StoreGroupOrderEntity
300 300
      */
301
-    public function setPaid(int $paid): StoreGroupOrderEntity
301
+    public function setPaid($paid): StoreGroupOrderEntity
302 302
     {
303 303
         $this->paid = $paid;
304 304
         return $this;
@@ -323,18 +323,18 @@ class StoreGroupOrderEntity extends DataEntity
323 323
     }
324 324
 
325 325
     /**
326
-     * @return int
326
+     * @return mixed
327 327
      */
328
-    public function getPayType(): int
328
+    public function getPayType()
329 329
     {
330 330
         return $this->payType;
331 331
     }
332 332
 
333 333
     /**
334
-     * @param int $payType
334
+     * @param mixed $payType
335 335
      * @return StoreGroupOrderEntity
336 336
      */
337
-    public function setPayType(int $payType): StoreGroupOrderEntity
337
+    public function setPayType($payType): StoreGroupOrderEntity
338 338
     {
339 339
         $this->payType = $payType;
340 340
         return $this;
@@ -359,54 +359,54 @@ class StoreGroupOrderEntity extends DataEntity
359 359
     }
360 360
 
361 361
     /**
362
-     * @return int
362
+     * @return mixed
363 363
      */
364
-    public function getIsRemind(): int
364
+    public function getIsRemind()
365 365
     {
366 366
         return $this->isRemind;
367 367
     }
368 368
 
369 369
     /**
370
-     * @param int $isRemind
370
+     * @param mixed $isRemind
371 371
      * @return StoreGroupOrderEntity
372 372
      */
373
-    public function setIsRemind(int $isRemind): StoreGroupOrderEntity
373
+    public function setIsRemind($isRemind): StoreGroupOrderEntity
374 374
     {
375 375
         $this->isRemind = $isRemind;
376 376
         return $this;
377 377
     }
378 378
 
379 379
     /**
380
-     * @return int
380
+     * @return mixed
381 381
      */
382
-    public function getIsDel(): int
382
+    public function getIsDel()
383 383
     {
384 384
         return $this->isDel;
385 385
     }
386 386
 
387 387
     /**
388
-     * @param int $isDel
388
+     * @param mixed $isDel
389 389
      * @return StoreGroupOrderEntity
390 390
      */
391
-    public function setIsDel(int $isDel): StoreGroupOrderEntity
391
+    public function setIsDel($isDel): StoreGroupOrderEntity
392 392
     {
393 393
         $this->isDel = $isDel;
394 394
         return $this;
395 395
     }
396 396
 
397 397
     /**
398
-     * @return string
398
+     * @return mixed
399 399
      */
400
-    public function getRand(): string
400
+    public function getRand()
401 401
     {
402 402
         return $this->rand;
403 403
     }
404 404
 
405 405
     /**
406
-     * @param string $rand
406
+     * @param mixed $rand
407 407
      * @return StoreGroupOrderEntity
408 408
      */
409
-    public function setRand(string $rand): StoreGroupOrderEntity
409
+    public function setRand($rand): StoreGroupOrderEntity
410 410
     {
411 411
         $this->rand = $rand;
412 412
         return $this;
@@ -424,61 +424,61 @@ class StoreGroupOrderEntity extends DataEntity
424 424
      * @param mixed $split
425 425
      * @return StoreGroupOrderEntity
426 426
      */
427
-    public function setSplit($split)
427
+    public function setSplit($split): StoreGroupOrderEntity
428 428
     {
429 429
         $this->split = $split;
430 430
         return $this;
431 431
     }
432 432
 
433 433
     /**
434
-     * @return string
434
+     * @return mixed
435 435
      */
436
-    public function getSerialNumber(): string
436
+    public function getSerialNumber()
437 437
     {
438 438
         return $this->serialNumber;
439 439
     }
440 440
 
441 441
     /**
442
-     * @param string $serialNumber
442
+     * @param mixed $serialNumber
443 443
      * @return StoreGroupOrderEntity
444 444
      */
445
-    public function setSerialNumber(string $serialNumber): StoreGroupOrderEntity
445
+    public function setSerialNumber($serialNumber): StoreGroupOrderEntity
446 446
     {
447 447
         $this->serialNumber = $serialNumber;
448 448
         return $this;
449 449
     }
450 450
 
451 451
     /**
452
-     * @return int
452
+     * @return mixed
453 453
      */
454
-    public function getTestOrder(): int
454
+    public function getTestOrder()
455 455
     {
456 456
         return $this->testOrder;
457 457
     }
458 458
 
459 459
     /**
460
-     * @param int $testOrder
460
+     * @param mixed $testOrder
461 461
      * @return StoreGroupOrderEntity
462 462
      */
463
-    public function setTestOrder(int $testOrder): StoreGroupOrderEntity
463
+    public function setTestOrder($testOrder): StoreGroupOrderEntity
464 464
     {
465 465
         $this->testOrder = $testOrder;
466 466
         return $this;
467 467
     }
468 468
 
469 469
     /**
470
-     * @return string
470
+     * @return mixed
471 471
      */
472
-    public function getHfPayId(): string
472
+    public function getHfPayId()
473 473
     {
474 474
         return $this->hfPayId;
475 475
     }
476 476
 
477 477
     /**
478
-     * @param string $hfPayId
478
+     * @param mixed $hfPayId
479 479
      * @return StoreGroupOrderEntity
480 480
      */
481
-    public function setHfPayId(string $hfPayId): StoreGroupOrderEntity
481
+    public function setHfPayId($hfPayId): StoreGroupOrderEntity
482 482
     {
483 483
         $this->hfPayId = $hfPayId;
484 484
         return $this;
@@ -503,9 +503,9 @@ class StoreGroupOrderEntity extends DataEntity
503 503
     }
504 504
 
505 505
     /**
506
-     * @return string
506
+     * @return mixed
507 507
      */
508
-    public function getFzonePaytype(): string
508
+    public function getFzonePaytype()
509 509
     {
510 510
         return $this->fzonePaytype;
511 511
     }
@@ -528,5 +528,6 @@ class StoreGroupOrderEntity extends DataEntity
528 528
         }
529 529
         $this->fzonePaytype = $fzonePaytype;
530 530
         return $this;
531
+
531 532
     }
532 533
 }

Разлика између датотеке није приказан због своје велике величине
+ 418 - 418
app/entity/data/store/StoreOrderEntity.php


+ 522 - 0
app/entity/data/store/StoreProductAttrValueEntity.php

@@ -0,0 +1,522 @@
1
+<?php
2
+
3
+namespace app\entity\data\store;
4
+
5
+use app\entity\data\DataEntity;
6
+
7
+class StoreProductAttrValueEntity extends DataEntity
8
+{
9
+    public $productId = null;  // 商品ID
10
+    public $detail = null;  // 商品详情
11
+    public $sku = null;  // 商品属性索引值
12
+    public $stock = null;  // 属性对应的库存
13
+    public $sales = null;  // 销量
14
+    public $image = null;  // 图片
15
+    public $barCode = null;  // 产品条码
16
+    public $cost = null;  // 成本价
17
+    public $otPrice = null;  // 原价
18
+    public $price = null;  // 价格
19
+    public $volume = null;  // 体积
20
+    public $weight = null;  // 重量
21
+    public $type = null;  // 活动类型
22
+    public $extensionOne = null;  // 养老金
23
+    public $extensionTwo = null;  // 二级佣金
24
+    public $unique = null;  // 唯一值
25
+    public $dacangPrice = null;  // 大仓会员价
26
+    public $costPrice = null;  // 供应链成本价
27
+    public $gongSkuId = null;  // 供应链sku_id
28
+    public $gongMerProfit = null;  // 供应链创客利润
29
+    public $gongPension = null;  // 供应链养老金
30
+    public $gongMarketPrice = null;  // 供应链销售价
31
+    public $plateMerProfit = null;  // 商户创客利润
32
+    public $pensionNum = null;  // 养老金%
33
+    public $shareNum = null;  // 分享奖%
34
+    public $stockNum = null;  // 股权%
35
+    public $sharesNum = null;  // 股票
36
+
37
+    /**
38
+     * @return mixed
39
+     */
40
+    public function getProductId()
41
+    {
42
+        return $this->productId;
43
+    }
44
+
45
+    /**
46
+     * @param mixed $productId
47
+     * @return StoreProductAttrValueEntity
48
+     */
49
+    public function setProductId($productId): StoreProductAttrValueEntity
50
+    {
51
+        $this->productId = $productId;
52
+        return $this;
53
+    }
54
+
55
+    /**
56
+     * @return mixed
57
+     */
58
+    public function getDetail()
59
+    {
60
+        return $this->detail;
61
+    }
62
+
63
+    /**
64
+     * @param mixed $detail
65
+     * @return StoreProductAttrValueEntity
66
+     */
67
+    public function setDetail($detail): StoreProductAttrValueEntity
68
+    {
69
+        $this->detail = $detail;
70
+        return $this;
71
+    }
72
+
73
+    /**
74
+     * @return mixed
75
+     */
76
+    public function getSku()
77
+    {
78
+        return $this->sku;
79
+    }
80
+
81
+    /**
82
+     * @param mixed $sku
83
+     * @return StoreProductAttrValueEntity
84
+     */
85
+    public function setSku($sku): StoreProductAttrValueEntity
86
+    {
87
+        $this->sku = $sku;
88
+        return $this;
89
+    }
90
+
91
+    /**
92
+     * @return mixed
93
+     */
94
+    public function getStock()
95
+    {
96
+        return $this->stock;
97
+    }
98
+
99
+    /**
100
+     * @param mixed $stock
101
+     * @return StoreProductAttrValueEntity
102
+     */
103
+    public function setStock($stock): StoreProductAttrValueEntity
104
+    {
105
+        $this->stock = $stock;
106
+        return $this;
107
+    }
108
+
109
+    /**
110
+     * @return mixed
111
+     */
112
+    public function getSales()
113
+    {
114
+        return $this->sales;
115
+    }
116
+
117
+    /**
118
+     * @param mixed $sales
119
+     * @return StoreProductAttrValueEntity
120
+     */
121
+    public function setSales($sales): StoreProductAttrValueEntity
122
+    {
123
+        $this->sales = $sales;
124
+        return $this;
125
+    }
126
+
127
+    /**
128
+     * @return null
129
+     */
130
+    public function getImage()
131
+    {
132
+        return $this->image;
133
+    }
134
+
135
+    /**
136
+     * @param null $image
137
+     * @return StoreProductAttrValueEntity
138
+     */
139
+    public function setImage($image): StoreProductAttrValueEntity
140
+    {
141
+        $this->image = $image;
142
+        return $this;
143
+    }
144
+
145
+    /**
146
+     * @return null
147
+     */
148
+    public function getBarCode()
149
+    {
150
+        return $this->barCode;
151
+    }
152
+
153
+    /**
154
+     * @param null $barCode
155
+     * @return StoreProductAttrValueEntity
156
+     */
157
+    public function setBarCode($barCode): StoreProductAttrValueEntity
158
+    {
159
+        $this->barCode = $barCode;
160
+        return $this;
161
+    }
162
+
163
+    /**
164
+     * @return null
165
+     */
166
+    public function getCost()
167
+    {
168
+        return $this->cost;
169
+    }
170
+
171
+    /**
172
+     * @param null $cost
173
+     * @return StoreProductAttrValueEntity
174
+     */
175
+    public function setCost($cost): StoreProductAttrValueEntity
176
+    {
177
+        $this->cost = $cost;
178
+        return $this;
179
+    }
180
+
181
+    /**
182
+     * @return null
183
+     */
184
+    public function getOtPrice()
185
+    {
186
+        return $this->otPrice;
187
+    }
188
+
189
+    /**
190
+     * @param null $otPrice
191
+     * @return StoreProductAttrValueEntity
192
+     */
193
+    public function setOtPrice($otPrice): StoreProductAttrValueEntity
194
+    {
195
+        $this->otPrice = $otPrice;
196
+        return $this;
197
+    }
198
+
199
+    /**
200
+     * @return null
201
+     */
202
+    public function getPrice()
203
+    {
204
+        return $this->price;
205
+    }
206
+
207
+    /**
208
+     * @param null $price
209
+     * @return StoreProductAttrValueEntity
210
+     */
211
+    public function setPrice($price): StoreProductAttrValueEntity
212
+    {
213
+        $this->price = $price;
214
+        return $this;
215
+    }
216
+
217
+    /**
218
+     * @return null
219
+     */
220
+    public function getVolume()
221
+    {
222
+        return $this->volume;
223
+    }
224
+
225
+    /**
226
+     * @param null $volume
227
+     * @return StoreProductAttrValueEntity
228
+     */
229
+    public function setVolume($volume): StoreProductAttrValueEntity
230
+    {
231
+        $this->volume = $volume;
232
+        return $this;
233
+    }
234
+
235
+    /**
236
+     * @return null
237
+     */
238
+    public function getWeight()
239
+    {
240
+        return $this->weight;
241
+    }
242
+
243
+    /**
244
+     * @param null $weight
245
+     * @return StoreProductAttrValueEntity
246
+     */
247
+    public function setWeight($weight): StoreProductAttrValueEntity
248
+    {
249
+        $this->weight = $weight;
250
+        return $this;
251
+    }
252
+
253
+    /**
254
+     * @return null
255
+     */
256
+    public function getType()
257
+    {
258
+        return $this->type;
259
+    }
260
+
261
+    /**
262
+     * @param null $type
263
+     * @return StoreProductAttrValueEntity
264
+     */
265
+    public function setType($type): StoreProductAttrValueEntity
266
+    {
267
+        $this->type = $type;
268
+        return $this;
269
+    }
270
+
271
+    /**
272
+     * @return null
273
+     */
274
+    public function getExtensionOne()
275
+    {
276
+        return $this->extensionOne;
277
+    }
278
+
279
+    /**
280
+     * @param null $extensionOne
281
+     * @return StoreProductAttrValueEntity
282
+     */
283
+    public function setExtensionOne($extensionOne): StoreProductAttrValueEntity
284
+    {
285
+        $this->extensionOne = $extensionOne;
286
+        return $this;
287
+    }
288
+
289
+    /**
290
+     * @return null
291
+     */
292
+    public function getExtensionTwo()
293
+    {
294
+        return $this->extensionTwo;
295
+    }
296
+
297
+    /**
298
+     * @param null $extensionTwo
299
+     * @return StoreProductAttrValueEntity
300
+     */
301
+    public function setExtensionTwo($extensionTwo): StoreProductAttrValueEntity
302
+    {
303
+        $this->extensionTwo = $extensionTwo;
304
+        return $this;
305
+    }
306
+
307
+    /**
308
+     * @return null
309
+     */
310
+    public function getUnique()
311
+    {
312
+        return $this->unique;
313
+    }
314
+
315
+    /**
316
+     * @param null $unique
317
+     * @return StoreProductAttrValueEntity
318
+     */
319
+    public function setUnique($unique): StoreProductAttrValueEntity
320
+    {
321
+        $this->unique = $unique;
322
+        return $this;
323
+    }
324
+
325
+    /**
326
+     * @return null
327
+     */
328
+    public function getDacangPrice()
329
+    {
330
+        return $this->dacangPrice;
331
+    }
332
+
333
+    /**
334
+     * @param null $dacangPrice
335
+     * @return StoreProductAttrValueEntity
336
+     */
337
+    public function setDacangPrice($dacangPrice): StoreProductAttrValueEntity
338
+    {
339
+        $this->dacangPrice = $dacangPrice;
340
+        return $this;
341
+    }
342
+
343
+    /**
344
+     * @return null
345
+     */
346
+    public function getCostPrice()
347
+    {
348
+        return $this->costPrice;
349
+    }
350
+
351
+    /**
352
+     * @param null $costPrice
353
+     * @return StoreProductAttrValueEntity
354
+     */
355
+    public function setCostPrice($costPrice): StoreProductAttrValueEntity
356
+    {
357
+        $this->costPrice = $costPrice;
358
+        return $this;
359
+    }
360
+
361
+    /**
362
+     * @return null
363
+     */
364
+    public function getGongSkuId()
365
+    {
366
+        return $this->gongSkuId;
367
+    }
368
+
369
+    /**
370
+     * @param null $gongSkuId
371
+     * @return StoreProductAttrValueEntity
372
+     */
373
+    public function setGongSkuId($gongSkuId): StoreProductAttrValueEntity
374
+    {
375
+        $this->gongSkuId = $gongSkuId;
376
+        return $this;
377
+    }
378
+
379
+    /**
380
+     * @return null
381
+     */
382
+    public function getGongMerProfit()
383
+    {
384
+        return $this->gongMerProfit;
385
+    }
386
+
387
+    /**
388
+     * @param null $gongMerProfit
389
+     * @return StoreProductAttrValueEntity
390
+     */
391
+    public function setGongMerProfit($gongMerProfit): StoreProductAttrValueEntity
392
+    {
393
+        $this->gongMerProfit = $gongMerProfit;
394
+        return $this;
395
+    }
396
+
397
+    /**
398
+     * @return null
399
+     */
400
+    public function getGongPension()
401
+    {
402
+        return $this->gongPension;
403
+    }
404
+
405
+    /**
406
+     * @param null $gongPension
407
+     * @return StoreProductAttrValueEntity
408
+     */
409
+    public function setGongPension($gongPension): StoreProductAttrValueEntity
410
+    {
411
+        $this->gongPension = $gongPension;
412
+        return $this;
413
+    }
414
+
415
+    /**
416
+     * @return null
417
+     */
418
+    public function getGongMarketPrice()
419
+    {
420
+        return $this->gongMarketPrice;
421
+    }
422
+
423
+    /**
424
+     * @param null $gongMarketPrice
425
+     * @return StoreProductAttrValueEntity
426
+     */
427
+    public function setGongMarketPrice($gongMarketPrice): StoreProductAttrValueEntity
428
+    {
429
+        $this->gongMarketPrice = $gongMarketPrice;
430
+        return $this;
431
+    }
432
+
433
+    /**
434
+     * @return null
435
+     */
436
+    public function getPlateMerProfit()
437
+    {
438
+        return $this->plateMerProfit;
439
+    }
440
+
441
+    /**
442
+     * @param null $plateMerProfit
443
+     * @return StoreProductAttrValueEntity
444
+     */
445
+    public function setPlateMerProfit($plateMerProfit): StoreProductAttrValueEntity
446
+    {
447
+        $this->plateMerProfit = $plateMerProfit;
448
+        return $this;
449
+    }
450
+
451
+    /**
452
+     * @return null
453
+     */
454
+    public function getPensionNum()
455
+    {
456
+        return $this->pensionNum;
457
+    }
458
+
459
+    /**
460
+     * @param null $pensionNum
461
+     * @return StoreProductAttrValueEntity
462
+     */
463
+    public function setPensionNum($pensionNum): StoreProductAttrValueEntity
464
+    {
465
+        $this->pensionNum = $pensionNum;
466
+        return $this;
467
+    }
468
+
469
+    /**
470
+     * @return null
471
+     */
472
+    public function getShareNum()
473
+    {
474
+        return $this->shareNum;
475
+    }
476
+
477
+    /**
478
+     * @param null $shareNum
479
+     * @return StoreProductAttrValueEntity
480
+     */
481
+    public function setShareNum($shareNum): StoreProductAttrValueEntity
482
+    {
483
+        $this->shareNum = $shareNum;
484
+        return $this;
485
+    }
486
+
487
+    /**
488
+     * @return null
489
+     */
490
+    public function getStockNum()
491
+    {
492
+        return $this->stockNum;
493
+    }
494
+
495
+    /**
496
+     * @param null $stockNum
497
+     * @return StoreProductAttrValueEntity
498
+     */
499
+    public function setStockNum($stockNum): StoreProductAttrValueEntity
500
+    {
501
+        $this->stockNum = $stockNum;
502
+        return $this;
503
+    }
504
+
505
+    /**
506
+     * @return null
507
+     */
508
+    public function getSharesNum()
509
+    {
510
+        return $this->sharesNum;
511
+    }
512
+
513
+    /**
514
+     * @param null $sharesNum
515
+     * @return StoreProductAttrValueEntity
516
+     */
517
+    public function setSharesNum($sharesNum): StoreProductAttrValueEntity
518
+    {
519
+        $this->sharesNum = $sharesNum;
520
+        return $this;
521
+    }
522
+}

Разлика између датотеке није приказан због своје велике величине
+ 1187 - 0
app/entity/data/store/StoreProductEntity.php


+ 50 - 50
app/entity/data/user/UserPvLogEntity.php

@@ -6,173 +6,173 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserPvLogEntity extends DataEntity
8 8
 {
9
-    public $id = 0;  // 自增id
10
-    public $uid = 0;  // 会员id
11
-    public $pv = 0.00;  // pv值
12
-    public $status = 0;  // pv状态: 1-有效 0-失效 -1待确认
13
-    public $mark = '';  // 备注
14
-    public $orderId = '';  // 订单id
15
-    public $orderType = '';  // 订单类型
16
-    public $settlementTime = null;  // 结算时间
17
-    public $addtime = 0;  // 添加时间
9
+    public $id = null;  // 自增id
10
+    public $uid = null;  // 会员id
11
+    public $pv = null;  // pv值
12
+    public $status = null;  // pv状态1-有效 0-失效 -1待确认
13
+    public $mark = null;  // 备注
14
+    public $order_id = null;  // 订单id
15
+    public $order_type = null;  // 订单类型。关联订单ID
16
+    public $settlement_time = null;  // 结算时间
17
+    public $addtime = null;  // 添加时间
18 18
 
19 19
     /**
20
-     * @return int
20
+     * @return mixed
21 21
      */
22
-    public function getId(): int
22
+    public function getId()
23 23
     {
24 24
         return $this->id;
25 25
     }
26 26
 
27 27
     /**
28
-     * @param int $id
28
+     * @param mixed $id
29 29
      * @return UserPvLogEntity
30 30
      */
31
-    public function setId(int $id): UserPvLogEntity
31
+    public function setId($id): UserPvLogEntity
32 32
     {
33 33
         $this->id = $id;
34 34
         return $this;
35 35
     }
36 36
 
37 37
     /**
38
-     * @return int
38
+     * @return mixed
39 39
      */
40
-    public function getUid(): int
40
+    public function getUid()
41 41
     {
42 42
         return $this->uid;
43 43
     }
44 44
 
45 45
     /**
46
-     * @param int $uid
46
+     * @param mixed $uid
47 47
      * @return UserPvLogEntity
48 48
      */
49
-    public function setUid(int $uid): UserPvLogEntity
49
+    public function setUid($uid): UserPvLogEntity
50 50
     {
51 51
         $this->uid = $uid;
52 52
         return $this;
53 53
     }
54 54
 
55 55
     /**
56
-     * @return float
56
+     * @return mixed
57 57
      */
58
-    public function getPv(): float
58
+    public function getPv()
59 59
     {
60 60
         return $this->pv;
61 61
     }
62 62
 
63 63
     /**
64
-     * @param float $pv
64
+     * @param mixed $pv
65 65
      * @return UserPvLogEntity
66 66
      */
67
-    public function setPv(float $pv): UserPvLogEntity
67
+    public function setPv($pv): UserPvLogEntity
68 68
     {
69 69
         $this->pv = $pv;
70 70
         return $this;
71 71
     }
72 72
 
73 73
     /**
74
-     * @return int
74
+     * @return mixed
75 75
      */
76
-    public function getStatus(): int
76
+    public function getStatus()
77 77
     {
78 78
         return $this->status;
79 79
     }
80 80
 
81 81
     /**
82
-     * @param int $status
82
+     * @param mixed $status
83 83
      * @return UserPvLogEntity
84 84
      */
85
-    public function setStatus(int $status): UserPvLogEntity
85
+    public function setStatus($status): UserPvLogEntity
86 86
     {
87 87
         $this->status = $status;
88 88
         return $this;
89 89
     }
90 90
 
91 91
     /**
92
-     * @return string
92
+     * @return mixed
93 93
      */
94
-    public function getMark(): string
94
+    public function getMark()
95 95
     {
96 96
         return $this->mark;
97 97
     }
98 98
 
99 99
     /**
100
-     * @param string $mark
100
+     * @param mixed $mark
101 101
      * @return UserPvLogEntity
102 102
      */
103
-    public function setMark(string $mark): UserPvLogEntity
103
+    public function setMark($mark): UserPvLogEntity
104 104
     {
105 105
         $this->mark = $mark;
106 106
         return $this;
107 107
     }
108 108
 
109 109
     /**
110
-     * @return string
110
+     * @return mixed
111 111
      */
112
-    public function getOrderId(): string
112
+    public function getOrderId()
113 113
     {
114
-        return $this->orderId;
114
+        return $this->order_id;
115 115
     }
116 116
 
117 117
     /**
118
-     * @param string $orderId
118
+     * @param mixed $order_id
119 119
      * @return UserPvLogEntity
120 120
      */
121
-    public function setOrderId(string $orderId): UserPvLogEntity
121
+    public function setOrderId($order_id): UserPvLogEntity
122 122
     {
123
-        $this->orderId = $orderId;
123
+        $this->order_id = $order_id;
124 124
         return $this;
125 125
     }
126 126
 
127 127
     /**
128
-     * @return string
128
+     * @return mixed
129 129
      */
130
-    public function getOrderType(): string
130
+    public function getOrderType()
131 131
     {
132
-        return $this->orderType;
132
+        return $this->order_type;
133 133
     }
134 134
 
135 135
     /**
136
-     * @param string $orderType
136
+     * @param mixed $order_type
137 137
      * @return UserPvLogEntity
138 138
      */
139
-    public function setOrderType(string $orderType): UserPvLogEntity
139
+    public function setOrderType($order_type): UserPvLogEntity
140 140
     {
141
-        $this->orderType = $orderType;
141
+        $this->order_type = $order_type;
142 142
         return $this;
143 143
     }
144 144
 
145 145
     /**
146
-     * @return null
146
+     * @return mixed
147 147
      */
148 148
     public function getSettlementTime()
149 149
     {
150
-        return $this->settlementTime;
150
+        return $this->settlement_time;
151 151
     }
152 152
 
153 153
     /**
154
-     * @param null $settlementTime
154
+     * @param mixed $settlement_time
155 155
      * @return UserPvLogEntity
156 156
      */
157
-    public function setSettlementTime($settlementTime)
157
+    public function setSettlementTime($settlement_time): UserPvLogEntity
158 158
     {
159
-        $this->settlementTime = $settlementTime;
159
+        $this->settlement_time = $settlement_time;
160 160
         return $this;
161 161
     }
162 162
 
163 163
     /**
164
-     * @return int
164
+     * @return mixed
165 165
      */
166
-    public function getAddtime(): int
166
+    public function getAddtime()
167 167
     {
168 168
         return $this->addtime;
169 169
     }
170 170
 
171 171
     /**
172
-     * @param int $addtime
172
+     * @param mixed $addtime
173 173
      * @return UserPvLogEntity
174 174
      */
175
-    public function setAddtime(int $addtime): UserPvLogEntity
175
+    public function setAddtime($addtime): UserPvLogEntity
176 176
     {
177 177
         $this->addtime = $addtime;
178 178
         return $this;

+ 19 - 0
app/entity/request/api/store/order/StoreOrderCreateRequestEntity.php

@@ -14,6 +14,7 @@ class StoreOrderCreateRequestEntity extends RequestCommonEntity
14 14
     public $distributionMode = 0;
15 15
     public $fzonePayType = [];
16 16
     public $shareId = 0;
17
+    public $uid = 0;
17 18
 
18 19
     public function getCartId(): int
19 20
     {
@@ -105,4 +106,22 @@ class StoreOrderCreateRequestEntity extends RequestCommonEntity
105 106
         $this->shareId = $shareId;
106 107
         return $this;
107 108
     }
109
+
110
+    /**
111
+     * @return int
112
+     */
113
+    public function getUid(): int
114
+    {
115
+        return $this->uid;
116
+    }
117
+
118
+    /**
119
+     * @param int $uid
120
+     * @return StoreOrderCreateRequestEntity
121
+     */
122
+    public function setUid(int $uid): StoreOrderCreateRequestEntity
123
+    {
124
+        $this->uid = $uid;
125
+        return $this;
126
+    }
108 127
 }