Sfoglia il codice sorgente

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

sunxbiao 1 anno fa
parent
commit
a3cae4e96a

+ 14 - 0
app/common/dao/user/UserBillDao.php

@@ -240,4 +240,18 @@ class UserBillDao extends BaseDao
240 240
         }
241 241
         return $entityList;
242 242
     }
243
+
244
+    /**
245
+     * 批量更新
246
+     * @param $dataList
247
+     * @return array
248
+     */
249
+    public function saveAll($dataList): array
250
+    {
251
+        try {
252
+            return $this->getModel()->saveAll($dataList)->toArray();
253
+        } catch (\Exception $e) {
254
+            return [];
255
+        }
256
+    }
243 257
 }

+ 0 - 40
app/common/dao/user/UserCertification.php

@@ -1,40 +0,0 @@
1
-<?php
2
-/**
3
- * @package merchant
4
- *
5
- * @author xaboy
6
- * @day 2020-04-28
7
- *
8
- * 
9
- */
10
-
11
-namespace app\common\dao\user;
12
-
13
-
14
-use app\common\dao\BaseDao;
15
-use app\common\model\BaseModel;
16
-
17
-
18
-/**
19
- * Class UserDao
20
- * @package app\common\dao\user
21
- * @author xaboy
22
- * @day 2020-04-28
23
- */
24
-class UserCertification extends BaseDao
25
-{
26
-
27
-    /**
28
-     * @return BaseModel
29
-     * @author xaboy
30
-     * @day 2020-03-30
31
-     */
32
-    protected function getModel(): string
33
-    {
34
-        return \app\common\model\user\UserCertification::class;
35
-    }
36
-
37
-
38
-
39
-
40
-}

+ 89 - 0
app/common/dao/user/UserCertificationDao.php

@@ -0,0 +1,89 @@
1
+<?php
2
+/**
3
+ * @package merchant
4
+ *
5
+ * @author xaboy
6
+ * @day 2020-04-28
7
+ *
8
+ *
9
+ */
10
+
11
+namespace app\common\dao\user;
12
+
13
+
14
+use app\common\dao\BaseDao;
15
+use app\common\model\BaseModel;
16
+use app\common\model\user\UserCertification;
17
+use app\entity\data\user\UserCertificationEntity;
18
+use think\db\exception\DataNotFoundException;
19
+use think\db\exception\DbException;
20
+use think\db\exception\ModelNotFoundException;
21
+
22
+
23
+/**
24
+ * Class UserDao
25
+ * @package app\common\dao\user
26
+ * @author xaboy
27
+ * @day 2020-04-28
28
+ */
29
+class UserCertificationDao extends BaseDao
30
+{
31
+
32
+    /**
33
+     * @return BaseModel
34
+     * @author xaboy
35
+     * @day 2020-03-30
36
+     */
37
+    protected function getModel(): string
38
+    {
39
+        return UserCertification::class;
40
+    }
41
+
42
+    /**
43
+     * @param array $idList
44
+     * @return UserCertificationEntity[]
45
+     */
46
+    public function getUserCertificationEntityListByIdList(array $idList): array
47
+    {
48
+        $entityList = [];
49
+        try {
50
+            $dataList = UserCertification::getDB()
51
+                ->whereIn('id', $idList)
52
+                ->select()
53
+                ->toArray();
54
+            if (!empty($dataList)) {
55
+                $entityList = array_map(function ($data) {
56
+                    return UserCertificationEntity::newInstance($data);
57
+                }, $dataList);
58
+            }
59
+        } catch (DataNotFoundException|ModelNotFoundException|DbException $e) {
60
+
61
+        }
62
+        return $entityList;
63
+    }
64
+
65
+    /**
66
+     * @param array $uidList
67
+     * @return UserCertificationEntity[]
68
+     */
69
+    public function getUserCertificationEntityListByUidList(array $uidList): array
70
+    {
71
+        $entityList = [];
72
+        try {
73
+            $dataList = UserCertification::getDB()
74
+                ->whereIn('uid', $uidList)
75
+                ->select()
76
+                ->toArray();
77
+            if (!empty($dataList)) {
78
+                $entityList = array_map(function ($data) {
79
+                    return UserCertificationEntity::newInstance($data);
80
+                }, $dataList);
81
+            }
82
+        } catch (DataNotFoundException|ModelNotFoundException|DbException $e) {
83
+
84
+        }
85
+        return $entityList;
86
+    }
87
+
88
+
89
+}

+ 14 - 0
app/common/dao/user/UserDao.php

@@ -432,4 +432,18 @@ class UserDao extends BaseDao
432 432
         }
433 433
         return $entityList;
434 434
     }
435
+
436
+    /**
437
+     * 批量更新
438
+     * @param $dataList
439
+     * @return array
440
+     */
441
+    public function saveAll($dataList): array
442
+    {
443
+        try {
444
+            return $this->getModel()->saveAll($dataList)->toArray();
445
+        } catch (\Exception $e) {
446
+            return [];
447
+        }
448
+    }
435 449
 }

+ 1 - 1
app/common/repositories/gzc/GzcLogRepository.php

@@ -45,7 +45,7 @@ class GzcLogRepository extends BaseRepository
45 45
      * @param int $payType
46 46
      * @return GzcLogEntity
47 47
      */
48
-    public function addGzcLog(int $uid, string $userName, string $mobile, string $userCard, int $orderType, string $orderId, float $pension, int $payType): GzcLogEntity
48
+    public function addGzcLog(int $uid, string $userName, string $mobile, string $userCard, int $orderType, string $orderId, float $pension, int $payType = 0): GzcLogEntity
49 49
     {
50 50
         $orderSn = '';
51 51
         $payTime = '';

+ 76 - 30
app/common/repositories/user/UserBillRepository.php

@@ -14,10 +14,13 @@ namespace app\common\repositories\user;
14 14
 use app\common\dao\BaseDao;
15 15
 use app\common\dao\user\UserBillDao;
16 16
 use app\common\enum\user\UserBillEnum;
17
+use app\common\enum\user\UserCertificationEnum;
17 18
 use app\common\model\user\UserBill;
18 19
 use app\common\repositories\BaseRepository;
20
+use app\common\repositories\gzc\GzcLogRepository;
19 21
 use app\common\repositories\store\order\StoreOrderRepository;
20 22
 use app\entity\data\user\UserBillEntity;
23
+use app\entity\data\user\UserCertificationEntity;
21 24
 use app\entity\data\user\UserEntity;
22 25
 use app\utils\ArrayUtil;
23 26
 use think\db\exception\DbException;
@@ -489,33 +492,55 @@ class UserBillRepository extends BaseRepository
489 492
         return $this->dao->getUserBillEntityListByOrderIdListAndPending($typeShop, $orderIdList);
490 493
     }
491 494
 
495
+    /**
496
+     * @param $dataList
497
+     * @return array
498
+     */
499
+    public function batchUpdateUserBillDataByDataList($dataList): array
500
+    {
501
+        return $this->dao->saveAll($dataList);
502
+    }
492 503
 
493 504
     /**
494 505
      * 将 账单 记录设置为生效状态 并对用户的 对应 字段进行增减
495 506
      * @param array $idList
496
-     * @return UserBillEntity
507
+     * @return array
497 508
      */
498
-    public function executeByIdList(array $idList): UserBillEntity
509
+    public function executeByIdList(array $idList): array
499 510
     {
500 511
         $userBillEntityList = $this->getUserBillEntityListByBillIdList($idList);
512
+        // 删除已经生效的 记录
513
+        $userBillEntityList = array_filter($userBillEntityList, function($entity) {
514
+            return $entity->getStatus() != UserBillEnum::STATUS['VALID']['code'];
515
+        });
516
+
501 517
         if (!empty($userBillEntityList)) {
502
-            $userIdList = array_map(function ($userBillEntity) {
518
+            $pensionUidList = [];
519
+            $userIdList = array_map(function ($userBillEntity) use (&$pensionUidList) {
520
+                if ($userBillEntity->getType() == UserBillEnum::COMMISSION_TYPE['PENSION']['code']) {
521
+                    $pensionUidList[] = $userBillEntity->getUid();
522
+                }
503 523
                 return $userBillEntity->getUid();
504 524
             }, $userBillEntityList);
505
-            /** @var UserEntity[] $userEntityList */
506
-            $userEntityList = [];
525
+
526
+            // 获取用户 映射信息
527
+            /** @var UserRepository $userRepository */
528
+            $userRepository = app()->make(UserRepository::class);
507 529
             /** @var UserEntity[] $userEntityMapByUid */
508 530
             $userEntityMapByUid = [];
509
-
510 531
             if (!empty($userIdList)) {
511
-                /** @var UserRepository $userRepository */
512
-                $userRepository = app()->make(UserRepository::class);
513
-                $userEntityList = $userRepository->getUserEntityListByUidList($userIdList);
514
-                /** @var UserEntity[] $userEntityMapByUid */
515
-                $userEntityMapByUid = array_column($userEntityList, null, 'uid');
516
-
517
-
532
+                $userEntityMapByUid = $userRepository->getUserEntityMapByUidList($userIdList);
518 533
             }
534
+            // 获取实名认证 映射信息
535
+            /** @var UserCertificationEntity[] $userCertificationEntityMapByUid */
536
+            $userCertificationEntityMapByUid = [];
537
+            if (!empty($pensionUidList)) {
538
+                /** @var UserCertificationRepository $userCertificationRepository */
539
+                $userCertificationRepository = app()->make(UserCertificationRepository::class);
540
+                $userCertificationEntityMapByUid = $userCertificationRepository->getUserCertificationEntityMapByUidListApproved($pensionUidList);
541
+            }
542
+            /** @var GzcLogRepository $gzcLogRepository */
543
+            $gzcLogRepository = app()->make(GzcLogRepository::class);
519 544
 
520 545
             $updateUserDataList = [];
521 546
             $updateUserBillDataList = [];
@@ -547,30 +572,51 @@ class UserBillRepository extends BaseRepository
547 572
                         $updateUserDataList[$userBillEntity->getUid()]['brokerage_price'] += $userBillEntity->getNumber();
548 573
                     }
549 574
                     // 更新佣金记录
550
-                    $updateUserBillDataList[$userBillEntity->getBillId()] = ['status' => UserBillEnum::STATUS['VALID']['code']];
575
+                    $updateUserBillDataList[$userBillEntity->getBillId()] = [
576
+                        'status' => UserBillEnum::STATUS['VALID']['code']
577
+                    ];
551 578
                 } else if ($userBillEntity->getType() == UserBillEnum::COMMISSION_TYPE['PENSION']['code']) {
579
+                    $updateUserBillDataList[$userBillEntity->getBillId()] = [
580
+                        'status' => UserBillEnum::STATUS['VALID']['code']
581
+                    ];
582
+                    if ($userBillEntity->getGzc() == UserBillEnum::GZC_STATUS['']) {
552 583
 
553
-                }
554
-
584
+                    }
585
+                    if (isset($userCertificationEntityMapByUid[$userBillEntity->getUid()])) {
586
+                        $userCertificationEntity = $userCertificationEntityMapByUid[$userBillEntity->getUid()];
587
+
588
+                        // 创建公证处记录
589
+                        $gzcLogRepository->addGzcLog(
590
+                            $userCertificationEntity->getUid(),
591
+                            $userCertificationEntity->getUserName(),
592
+                            $userCertificationEntity->getMobile(),
593
+                            $userCertificationEntity->getUserCard(),
594
+                            $userBillEntity->getTypeShop(),
595
+                            $userBillEntity->getOrderSn(),
596
+                            $userBillEntity->getNumber()
597
+                        );
598
+                        // 更新佣金记录
555 599
 
556
-                try {
557
-                    $userBillEntity
558
-                        ->setSurplus($surplus)
559
-                        ->setSettlementTime(date('Y-m-d H:i:s'));
560
-                    $userRepository->update($userEntity->getUid(), ['vr' => $surplus]);
561
-                    $this->dao->update($userBillEntity->getId(), [
562
-                        'surplus' => $userBillEntity->getSurplus(),
563
-                        'settlement_time' => $userBillEntity->getSettlementTime()
564
-                    ]);
565
-                } catch (DbException $e) {
600
+                    }
601
+                }
602
+                if (!empty($updateUserDataList)) {
603
+                    $updateList = [];
604
+                    foreach ($updateUserDataList as $uid => $fields) {
605
+                        $updateList[] = array_merge(['uid' => $uid], $fields);
606
+                    }
607
+                    $userRepository->batchUpdateUserDataByDataList($updateList);
608
+                }
566 609
 
610
+                if (!empty($updateUserBillDataList)) {
611
+                    $updateList = [];
612
+                    foreach ($updateUserBillDataList as $billId => $fields) {
613
+                        $updateList[] = array_merge(['bill_id' => $billId], $fields);
614
+                    }
615
+                    $this->batchUpdateUserBillDataByDataList($updateList);
567 616
                 }
568 617
             }
569 618
         }
570 619
 
571
-
572
-
573
-
574
-        return $userBillEntity;
620
+        return $idList;
575 621
     }
576 622
 }

+ 86 - 0
app/common/repositories/user/UserCertificationRepository.php

@@ -0,0 +1,86 @@
1
+<?php
2
+
3
+namespace app\common\repositories\user;
4
+
5
+use app\common\dao\user\UserCertificationDao;
6
+use app\common\enum\user\UserCertificationEnum;
7
+use app\common\repositories\BaseRepository;
8
+use app\entity\data\user\UserCertificationEntity;
9
+
10
+class UserCertificationRepository extends BaseRepository
11
+{
12
+    public function __construct(UserCertificationDao $dao)
13
+    {
14
+        $this->dao = $dao;
15
+    }
16
+
17
+    /**
18
+     * @param int $id
19
+     * @return UserCertificationEntity
20
+     */
21
+    public function getUserCertificationEntityById(int $id): UserCertificationEntity
22
+    {
23
+        $entityList = $this->getUserCertificationEntityListByIdList([$id]);
24
+        $entity = array_shift($entityList);
25
+        if ($entity instanceof UserCertificationEntity) {
26
+            return $entity;
27
+        } else {
28
+            /** @var UserCertificationEntity */
29
+            return UserCertificationEntity::newInstance();
30
+        }
31
+    }
32
+
33
+    /**
34
+     * @param array $idList
35
+     * @return UserCertificationEntity[]
36
+     */
37
+    public function getUserCertificationEntityListByIdList(array $idList): array
38
+    {
39
+        return $this->dao->getUserCertificationEntityListByIdList($idList);
40
+    }
41
+
42
+    /**
43
+     * @param array $uidList
44
+     * @return UserCertificationEntity[]
45
+     */
46
+    public function getUserCertificationEntityListByUidList(array $uidList): array
47
+    {
48
+        return $this->dao->getUserCertificationEntityListByUidList($uidList);
49
+    }
50
+
51
+    /**
52
+     * 获取 已通过的 用户实名认证实体 映射 根据用户ID
53
+     * @param array $uidList
54
+     * @return UserCertificationEntity[]
55
+     */
56
+    public function getUserCertificationEntityMapByUidListApproved(array $uidList): array
57
+    {
58
+        /** @var UserCertificationEntity[] $userCertificationEntityMapByUid */
59
+        $userCertificationEntityMapByUid = [];
60
+        $userCertificationEntityList = $this->getUserCertificationEntityListByUidList($uidList);
61
+        foreach ($userCertificationEntityList as $userCertificationEntity) {
62
+            if ($userCertificationEntity->getStatus() == UserCertificationEnum::STATUS['Approved']['code'] && !empty($userCertificationEntity->getUserCard())) {
63
+                $userCertificationEntityMapByUid[$userCertificationEntity->getUid()] = $userCertificationEntity;
64
+            }
65
+        }
66
+        return $userCertificationEntityMapByUid;
67
+    }
68
+
69
+    public function create($data)
70
+    {
71
+        return $this->dao->create($data);
72
+    }
73
+
74
+    /**
75
+     * 写入实名认证记录
76
+     * @param UserCertificationEntity $UserCertificationEntity
77
+     * @return UserCertificationEntity
78
+     */
79
+    public function createByEntity(UserCertificationEntity $UserCertificationEntity): UserCertificationEntity
80
+    {
81
+        $result = $this->dao->create($UserCertificationEntity->toUnderlineArray())->toArray();
82
+        /** @var UserCertificationEntity $entity */
83
+        $entity = UserCertificationEntity::newInstance($result);
84
+        return $entity;
85
+    }
86
+}

+ 24 - 5
app/common/repositories/user/UserRepository.php

@@ -4488,6 +4488,19 @@ class UserRepository extends BaseRepository
4488 4488
     }
4489 4489
 
4490 4490
     /**
4491
+     * 获取用户实体集合 根据 uid集合
4492
+     * @param array $uidList
4493
+     * @return UserEntity[]
4494
+     */
4495
+    public function getUserEntityMapByUidList(array $uidList): array
4496
+    {
4497
+        $userEntityList = $this->getUserEntityListByUidList($uidList);
4498
+        /** @var UserEntity[] $userEntityMapByUid */
4499
+        $userEntityMapByUid = array_column($userEntityList, null, 'uid');
4500
+        return $userEntityMapByUid;
4501
+    }
4502
+
4503
+    /**
4491 4504
      * 更新用户积分 并 写入积分变动记录
4492 4505
      * @param int $uid
4493 4506
      * @param int $type
@@ -4684,11 +4697,7 @@ class UserRepository extends BaseRepository
4684 4697
     /**
4685 4698
      * 更新用户复购金 并 写入 复购金变动记录
4686 4699
      * @param int $uid
4687
-     * @param int $type
4688
-     * @param float $fugou
4689
-     * @param string $mark
4690
-     * @param string $orderType
4691
-     * @param string $orderId
4700
+     * @param int $recordId
4692 4701
      * @return float
4693 4702
      */
4694 4703
     public function updateUserBrokeragePriceByRecordId(int $uid, int $recordId): float
@@ -4729,4 +4738,14 @@ class UserRepository extends BaseRepository
4729 4738
         }
4730 4739
         return (float)$surplus;
4731 4740
     }
4741
+
4742
+    /**
4743
+     * 批量更新
4744
+     * @param $dataList
4745
+     * @return array
4746
+     */
4747
+    public function batchUpdateUserDataByDataList($dataList): array
4748
+    {
4749
+        return $this->dao->saveAll($dataList);
4750
+    }
4732 4751
 }

+ 168 - 169
app/entity/data/user/UserBillEntity.php

@@ -6,518 +6,517 @@ use app\entity\data\DataEntity;
6 6
 
7 7
 class UserBillEntity extends DataEntity
8 8
 {
9
-    public $billId = 0;  // 用户账单id
10
-    public $uid = 0;  // 用户uid
11
-    public $linkId = 0;  // 关联订单id
12
-    public $pm = 0;  // 收支类型 0 = 支出 1 = 获得
13
-    public $title = '';  // 账单标题
14
-    public $category = '';  // 明细种类
15
-    public $type = '';  // 明细类型
16
-    public $number = 0.00;  // 明细数字
17
-    public $balance = 0.00;  // 剩余
18
-    public $mark = '';  // 备注
19
-    public $createTime = '';  // 添加时间
20
-    public $status = 1;  // 状态 0 = 待确定 1 = 有效 -1 = 无效
21
-    public $commissionType = 0;  // 佣金类型
22
-    public $orderSn = '';  // 订单号
23
-    public $tripartite = 0;  // 第三方类型
24
-    public $typeShop = 0;  // 类型商店 0平台1多多进宝2唯品会3苏宁易购4网易考拉5淘宝客6京东联盟7饿了么8线上9话费
25
-    public $merId = 0;  // 商户id
26
-    public $source = 0;  // 账单来源 1 线下 0线上
27
-    public $orderType = 1;  // 订单类型 1自营  2 第三方
28
-    public $isRedBrokerage = 0;  // 红积分对冲佣金类型 0正常佣金 1红积分对冲佣
29
-    public $gzc = 0;  // 公证处状态 0:未进入 1:已进入
30
-    public $isGzc = 0;  // 是否成功发起 0:未发起 1:已发起 2:已成功
31
-    public $takeTime = 0;  // 结算时间
32
-    public $districtId = 0;  // 区域id
33
-    public $streetId = 0;  // 街道id
34
-    public $month = '';  // 月份
35
-    public $num = 1;  // 份数
36
-
37
-    /**
38
-     * @return int
39
-     */
40
-    public function getBillId(): int
41
-    {
42
-        return $this->billId;
43
-    }
44
-
45
-    /**
46
-     * @param int $billId
9
+    public $bill_id = null;           // 用户账单id
10
+    public $uid = null;               // 用户uid
11
+    public $link_id = null;           // 关联订单id
12
+    public $pm = null;                // 0 = 支出 1 = 获得
13
+    public $title = null;             // 账单标题
14
+    public $category = null;          // 明细种类
15
+    public $type = null;              // 明细类型 commission佣金
16
+    public $number = null;            // 明细数字
17
+    public $balance = null;           // 剩余
18
+    public $mark = null;              // 备注
19
+    public $create_time = null;       // 添加时间
20
+    public $status = null;            // 0 = 待确定 1 = 有效 -1 = 无效
21
+    public $commission_type = null;   // 佣金类型
22
+    public $order_sn = null;          // 订单号
23
+    public $tripartite = null;        // 三方支付类型
24
+    public $type_shop = null;         // 平台或店铺类型
25
+    public $mer_id = null;            // 商户id
26
+    public $source = null;            // 1 线下 0线上
27
+    public $order_type = null;        // 订单类型 1自营 2 第三方
28
+    public $is_red_brokerage = null;  // 红积分对冲佣金 0正常佣
29
+    public $gzc = null;               // 养老金是否已进入公证处log表
30
+    public $is_gzc = null;            // 养老金是否发起过
31
+    public $take_time = null;         // 结算时间
32
+    public $district_id = null;       // 区域ID
33
+    public $street_id = null;         // 街道ID
34
+    public $month = null;             // 月份
35
+    public $num = null;               // 份数
36
+
37
+    /**
38
+     * @return mixed
39
+     */
40
+    public function getBillId()
41
+    {
42
+        return $this->bill_id;
43
+    }
44
+
45
+    /**
46
+     * @param mixed $bill_id
47 47
      * @return UserBillEntity
48 48
      */
49
-    public function setBillId(int $billId): UserBillEntity
49
+    public function setBillId($bill_id): UserBillEntity
50 50
     {
51
-        $this->billId = $billId;
51
+        $this->bill_id = $bill_id;
52 52
         return $this;
53 53
     }
54 54
 
55 55
     /**
56
-     * @return int
56
+     * @return mixed
57 57
      */
58
-    public function getUid(): int
58
+    public function getUid()
59 59
     {
60 60
         return $this->uid;
61 61
     }
62 62
 
63 63
     /**
64
-     * @param int $uid
64
+     * @param mixed $uid
65 65
      * @return UserBillEntity
66 66
      */
67
-    public function setUid(int $uid): UserBillEntity
67
+    public function setUid($uid): UserBillEntity
68 68
     {
69 69
         $this->uid = $uid;
70 70
         return $this;
71 71
     }
72 72
 
73 73
     /**
74
-     * @return int
74
+     * @return mixed
75 75
      */
76
-    public function getLinkId(): int
76
+    public function getLinkId()
77 77
     {
78
-        return $this->linkId;
78
+        return $this->link_id;
79 79
     }
80 80
 
81 81
     /**
82
-     * @param int $linkId
82
+     * @param mixed $link_id
83 83
      * @return UserBillEntity
84 84
      */
85
-    public function setLinkId(int $linkId): UserBillEntity
85
+    public function setLinkId($link_id): UserBillEntity
86 86
     {
87
-        $this->linkId = $linkId;
87
+        $this->link_id = $link_id;
88 88
         return $this;
89 89
     }
90 90
 
91 91
     /**
92
-     * @return int
92
+     * @return mixed
93 93
      */
94
-    public function getPm(): int
94
+    public function getPm()
95 95
     {
96 96
         return $this->pm;
97 97
     }
98 98
 
99 99
     /**
100
-     * @param int $pm
100
+     * @param mixed $pm
101 101
      * @return UserBillEntity
102 102
      */
103
-    public function setPm(int $pm): UserBillEntity
103
+    public function setPm($pm): UserBillEntity
104 104
     {
105 105
         $this->pm = $pm;
106 106
         return $this;
107 107
     }
108 108
 
109 109
     /**
110
-     * @return string
110
+     * @return mixed
111 111
      */
112
-    public function getTitle(): string
112
+    public function getTitle()
113 113
     {
114 114
         return $this->title;
115 115
     }
116 116
 
117 117
     /**
118
-     * @param string $title
118
+     * @param mixed $title
119 119
      * @return UserBillEntity
120 120
      */
121
-    public function setTitle(string $title): UserBillEntity
121
+    public function setTitle($title): UserBillEntity
122 122
     {
123 123
         $this->title = $title;
124 124
         return $this;
125 125
     }
126 126
 
127 127
     /**
128
-     * @return string
128
+     * @return mixed
129 129
      */
130
-    public function getCategory(): string
130
+    public function getCategory()
131 131
     {
132 132
         return $this->category;
133 133
     }
134 134
 
135 135
     /**
136
-     * @param string $category
136
+     * @param mixed $category
137 137
      * @return UserBillEntity
138 138
      */
139
-    public function setCategory(string $category): UserBillEntity
139
+    public function setCategory($category): UserBillEntity
140 140
     {
141 141
         $this->category = $category;
142 142
         return $this;
143 143
     }
144 144
 
145 145
     /**
146
-     * @return string
146
+     * @return mixed
147 147
      */
148
-    public function getType(): string
148
+    public function getType()
149 149
     {
150 150
         return $this->type;
151 151
     }
152 152
 
153 153
     /**
154
-     * @param string $type
154
+     * @param mixed $type
155 155
      * @return UserBillEntity
156 156
      */
157
-    public function setType(string $type): UserBillEntity
157
+    public function setType($type): UserBillEntity
158 158
     {
159 159
         $this->type = $type;
160 160
         return $this;
161 161
     }
162 162
 
163 163
     /**
164
-     * @return float
164
+     * @return mixed
165 165
      */
166
-    public function getNumber(): float
166
+    public function getNumber()
167 167
     {
168 168
         return $this->number;
169 169
     }
170 170
 
171 171
     /**
172
-     * @param float $number
172
+     * @param mixed $number
173 173
      * @return UserBillEntity
174 174
      */
175
-    public function setNumber(float $number): UserBillEntity
175
+    public function setNumber($number): UserBillEntity
176 176
     {
177 177
         $this->number = $number;
178 178
         return $this;
179 179
     }
180 180
 
181 181
     /**
182
-     * @return float
182
+     * @return mixed
183 183
      */
184
-    public function getBalance(): float
184
+    public function getBalance()
185 185
     {
186 186
         return $this->balance;
187 187
     }
188 188
 
189 189
     /**
190
-     * @param float $balance
190
+     * @param mixed $balance
191 191
      * @return UserBillEntity
192 192
      */
193
-    public function setBalance(float $balance): UserBillEntity
193
+    public function setBalance($balance): UserBillEntity
194 194
     {
195 195
         $this->balance = $balance;
196 196
         return $this;
197 197
     }
198 198
 
199 199
     /**
200
-     * @return string
200
+     * @return mixed
201 201
      */
202
-    public function getMark(): string
202
+    public function getMark()
203 203
     {
204 204
         return $this->mark;
205 205
     }
206 206
 
207 207
     /**
208
-     * @param string $mark
208
+     * @param mixed $mark
209 209
      * @return UserBillEntity
210 210
      */
211
-    public function setMark(string $mark): UserBillEntity
211
+    public function setMark($mark): UserBillEntity
212 212
     {
213 213
         $this->mark = $mark;
214 214
         return $this;
215 215
     }
216 216
 
217 217
     /**
218
-     * @return string
218
+     * @return mixed
219 219
      */
220
-    public function getCreateTime(): string
220
+    public function getCreateTime()
221 221
     {
222
-        return $this->createTime;
222
+        return $this->create_time;
223 223
     }
224 224
 
225 225
     /**
226
-     * @param string $createTime
226
+     * @param mixed $create_time
227 227
      * @return UserBillEntity
228 228
      */
229
-    public function setCreateTime(string $createTime): UserBillEntity
229
+    public function setCreateTime($create_time): UserBillEntity
230 230
     {
231
-        $this->createTime = $createTime;
231
+        $this->create_time = $create_time;
232 232
         return $this;
233 233
     }
234 234
 
235 235
     /**
236
-     * @return int
236
+     * @return mixed
237 237
      */
238
-    public function getStatus(): int
238
+    public function getStatus()
239 239
     {
240 240
         return $this->status;
241 241
     }
242 242
 
243 243
     /**
244
-     * @param int $status
244
+     * @param mixed $status
245 245
      * @return UserBillEntity
246 246
      */
247
-    public function setStatus(int $status): UserBillEntity
247
+    public function setStatus($status): UserBillEntity
248 248
     {
249 249
         $this->status = $status;
250 250
         return $this;
251 251
     }
252 252
 
253 253
     /**
254
-     * @return int
254
+     * @return mixed
255 255
      */
256
-    public function getCommissionType(): int
256
+    public function getCommissionType()
257 257
     {
258
-        return $this->commissionType;
258
+        return $this->commission_type;
259 259
     }
260 260
 
261 261
     /**
262
-     * @param int $commissionType
262
+     * @param mixed $commission_type
263 263
      * @return UserBillEntity
264 264
      */
265
-    public function setCommissionType(int $commissionType): UserBillEntity
265
+    public function setCommissionType($commission_type): UserBillEntity
266 266
     {
267
-        $this->commissionType = $commissionType;
267
+        $this->commission_type = $commission_type;
268 268
         return $this;
269 269
     }
270 270
 
271 271
     /**
272
-     * @return string
272
+     * @return mixed
273 273
      */
274
-    public function getOrderSn(): string
274
+    public function getOrderSn()
275 275
     {
276
-        return $this->orderSn;
276
+        return $this->order_sn;
277 277
     }
278 278
 
279 279
     /**
280
-     * @param string $orderSn
280
+     * @param mixed $order_sn
281 281
      * @return UserBillEntity
282 282
      */
283
-    public function setOrderSn(string $orderSn): UserBillEntity
283
+    public function setOrderSn($order_sn): UserBillEntity
284 284
     {
285
-        $this->orderSn = $orderSn;
285
+        $this->order_sn = $order_sn;
286 286
         return $this;
287 287
     }
288 288
 
289 289
     /**
290
-     * @return int
290
+     * @return mixed
291 291
      */
292
-    public function getTripartite(): int
292
+    public function getTripartite()
293 293
     {
294 294
         return $this->tripartite;
295 295
     }
296 296
 
297 297
     /**
298
-     * @param int $tripartite
298
+     * @param mixed $tripartite
299 299
      * @return UserBillEntity
300 300
      */
301
-    public function setTripartite(int $tripartite): UserBillEntity
301
+    public function setTripartite($tripartite): UserBillEntity
302 302
     {
303 303
         $this->tripartite = $tripartite;
304 304
         return $this;
305 305
     }
306 306
 
307 307
     /**
308
-     * @return int
308
+     * @return mixed
309 309
      */
310
-    public function getTypeShop(): int
310
+    public function getTypeShop()
311 311
     {
312
-        return $this->typeShop;
312
+        return $this->type_shop;
313 313
     }
314 314
 
315 315
     /**
316
-     * @param int $typeShop
316
+     * @param mixed $type_shop
317 317
      * @return UserBillEntity
318 318
      */
319
-    public function setTypeShop(int $typeShop): UserBillEntity
319
+    public function setTypeShop($type_shop): UserBillEntity
320 320
     {
321
-        $this->typeShop = $typeShop;
321
+        $this->type_shop = $type_shop;
322 322
         return $this;
323 323
     }
324 324
 
325 325
     /**
326
-     * @return int
326
+     * @return mixed
327 327
      */
328
-    public function getMerId(): int
328
+    public function getMerId()
329 329
     {
330
-        return $this->merId;
330
+        return $this->mer_id;
331 331
     }
332 332
 
333 333
     /**
334
-     * @param int $merId
334
+     * @param mixed $mer_id
335 335
      * @return UserBillEntity
336 336
      */
337
-    public function setMerId(int $merId): UserBillEntity
337
+    public function setMerId($mer_id): UserBillEntity
338 338
     {
339
-        $this->merId = $merId;
339
+        $this->mer_id = $mer_id;
340 340
         return $this;
341 341
     }
342 342
 
343 343
     /**
344
-     * @return int
344
+     * @return mixed
345 345
      */
346
-    public function getSource(): int
346
+    public function getSource()
347 347
     {
348 348
         return $this->source;
349 349
     }
350 350
 
351 351
     /**
352
-     * @param int $source
352
+     * @param mixed $source
353 353
      * @return UserBillEntity
354 354
      */
355
-    public function setSource(int $source): UserBillEntity
355
+    public function setSource($source): UserBillEntity
356 356
     {
357 357
         $this->source = $source;
358 358
         return $this;
359 359
     }
360 360
 
361 361
     /**
362
-     * @return int
362
+     * @return mixed
363 363
      */
364
-    public function getOrderType(): int
364
+    public function getOrderType()
365 365
     {
366
-        return $this->orderType;
366
+        return $this->order_type;
367 367
     }
368 368
 
369 369
     /**
370
-     * @param int $orderType
370
+     * @param mixed $order_type
371 371
      * @return UserBillEntity
372 372
      */
373
-    public function setOrderType(int $orderType): UserBillEntity
373
+    public function setOrderType($order_type): UserBillEntity
374 374
     {
375
-        $this->orderType = $orderType;
375
+        $this->order_type = $order_type;
376 376
         return $this;
377 377
     }
378 378
 
379 379
     /**
380
-     * @return int
380
+     * @return mixed
381 381
      */
382
-    public function getIsRedBrokerage(): int
382
+    public function getIsRedBrokerage()
383 383
     {
384
-        return $this->isRedBrokerage;
384
+        return $this->is_red_brokerage;
385 385
     }
386 386
 
387 387
     /**
388
-     * @param int $isRedBrokerage
388
+     * @param mixed $is_red_brokerage
389 389
      * @return UserBillEntity
390 390
      */
391
-    public function setIsRedBrokerage(int $isRedBrokerage): UserBillEntity
391
+    public function setIsRedBrokerage($is_red_brokerage): UserBillEntity
392 392
     {
393
-        $this->isRedBrokerage = $isRedBrokerage;
393
+        $this->is_red_brokerage = $is_red_brokerage;
394 394
         return $this;
395 395
     }
396 396
 
397 397
     /**
398
-     * @return int
398
+     * @return mixed
399 399
      */
400
-    public function getGzc(): int
400
+    public function getGzc()
401 401
     {
402 402
         return $this->gzc;
403 403
     }
404 404
 
405 405
     /**
406
-     * @param int $gzc
406
+     * @param mixed $gzc
407 407
      * @return UserBillEntity
408 408
      */
409
-    public function setGzc(int $gzc): UserBillEntity
409
+    public function setGzc($gzc): UserBillEntity
410 410
     {
411 411
         $this->gzc = $gzc;
412 412
         return $this;
413 413
     }
414 414
 
415 415
     /**
416
-     * @return int
416
+     * @return mixed
417 417
      */
418
-    public function getIsGzc(): int
418
+    public function getIsGzc()
419 419
     {
420
-        return $this->isGzc;
420
+        return $this->is_gzc;
421 421
     }
422 422
 
423 423
     /**
424
-     * @param int $isGzc
424
+     * @param mixed $is_gzc
425 425
      * @return UserBillEntity
426 426
      */
427
-    public function setIsGzc(int $isGzc): UserBillEntity
427
+    public function setIsGzc($is_gzc): UserBillEntity
428 428
     {
429
-        $this->isGzc = $isGzc;
429
+        $this->is_gzc = $is_gzc;
430 430
         return $this;
431 431
     }
432 432
 
433 433
     /**
434
-     * @return int
434
+     * @return mixed
435 435
      */
436
-    public function getTakeTime(): int
436
+    public function getTakeTime()
437 437
     {
438
-        return $this->takeTime;
438
+        return $this->take_time;
439 439
     }
440 440
 
441 441
     /**
442
-     * @param int $takeTime
442
+     * @param mixed $take_time
443 443
      * @return UserBillEntity
444 444
      */
445
-    public function setTakeTime(int $takeTime): UserBillEntity
445
+    public function setTakeTime($take_time): UserBillEntity
446 446
     {
447
-        $this->takeTime = $takeTime;
447
+        $this->take_time = $take_time;
448 448
         return $this;
449 449
     }
450 450
 
451 451
     /**
452
-     * @return int
452
+     * @return mixed
453 453
      */
454
-    public function getDistrictId(): int
454
+    public function getDistrictId()
455 455
     {
456
-        return $this->districtId;
456
+        return $this->district_id;
457 457
     }
458 458
 
459 459
     /**
460
-     * @param int $districtId
460
+     * @param mixed $district_id
461 461
      * @return UserBillEntity
462 462
      */
463
-    public function setDistrictId(int $districtId): UserBillEntity
463
+    public function setDistrictId($district_id): UserBillEntity
464 464
     {
465
-        $this->districtId = $districtId;
465
+        $this->district_id = $district_id;
466 466
         return $this;
467 467
     }
468 468
 
469 469
     /**
470
-     * @return int
470
+     * @return mixed
471 471
      */
472
-    public function getStreetId(): int
472
+    public function getStreetId()
473 473
     {
474
-        return $this->streetId;
474
+        return $this->street_id;
475 475
     }
476 476
 
477 477
     /**
478
-     * @param int $streetId
478
+     * @param mixed $street_id
479 479
      * @return UserBillEntity
480 480
      */
481
-    public function setStreetId(int $streetId): UserBillEntity
481
+    public function setStreetId($street_id): UserBillEntity
482 482
     {
483
-        $this->streetId = $streetId;
483
+        $this->street_id = $street_id;
484 484
         return $this;
485 485
     }
486 486
 
487 487
     /**
488
-     * @return string
488
+     * @return mixed
489 489
      */
490
-    public function getMonth(): string
490
+    public function getMonth()
491 491
     {
492 492
         return $this->month;
493 493
     }
494 494
 
495 495
     /**
496
-     * @param string $month
496
+     * @param mixed $month
497 497
      * @return UserBillEntity
498 498
      */
499
-    public function setMonth(string $month): UserBillEntity
499
+    public function setMonth($month): UserBillEntity
500 500
     {
501 501
         $this->month = $month;
502 502
         return $this;
503 503
     }
504 504
 
505 505
     /**
506
-     * @return int
506
+     * @return mixed
507 507
      */
508
-    public function getNum(): int
508
+    public function getNum()
509 509
     {
510 510
         return $this->num;
511 511
     }
512 512
 
513 513
     /**
514
-     * @param int $num
514
+     * @param mixed $num
515 515
      * @return UserBillEntity
516 516
      */
517
-    public function setNum(int $num): UserBillEntity
517
+    public function setNum($num): UserBillEntity
518 518
     {
519 519
         $this->num = $num;
520 520
         return $this;
521 521
     }
522
-
523 522
 }