shichen месяцев назад: 4
Родитель
Сommit
e2c56b85e2

+ 15 - 0
app/common/dao/shared/SharedProsperityUserGroupLogDao.php

@@ -0,0 +1,15 @@
1
+<?php
2
+
3
+namespace app\common\dao\shared;
4
+
5
+use app\common\dao\BaseDao;
6
+use app\common\model\shared\SharedProsperityUserGroupLog;
7
+use app\common\model\shared\SharedProsperityUserLevelLog;
8
+
9
+class SharedProsperityUserGroupLogDao extends BaseDao
10
+{
11
+    protected function getModel(): string
12
+    {
13
+        return SharedProsperityUserGroupLog::class;
14
+    }
15
+}

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

@@ -0,0 +1,16 @@
1
+<?php
2
+
3
+namespace app\common\dao\store\order;
4
+
5
+
6
+use app\common\dao\BaseDao;
7
+use app\common\model\store\order\PickUp;
8
+
9
+class PickUpDao extends BaseDao
10
+{
11
+
12
+    protected function getModel(): string
13
+    {
14
+        return PickUp::class;
15
+    }
16
+}

+ 6 - 4
app/common/dao/user/FeedbackDao.php

@@ -45,15 +45,17 @@ class FeedbackDao extends BaseDao
45 45
         return Feedback::getDB()->when(isset($where['uid']) && $where['uid'] !== '', function ($query) use ($where) {
46 46
             $query->where('uid', $where['uid']);
47 47
         })->when(isset($where['keyword']) && $where['keyword'] !== '', function ($query) use ($where) {
48
-            $query->where('content','like', '%'.$where['keyword'].'%')->whereOr('reply','like', '%'.$where['keyword'].'%')->whereOr('remake','like', '%'.$where['keyword'].'%');
48
+            $query->where('content', 'like', '%' . $where['keyword'] . '%')->whereOr('reply', 'like', '%' . $where['keyword'] . '%')->whereOr('remake', 'like', '%' . $where['keyword'] . '%');
49 49
         })->when(isset($where['type']) && $where['type'] !== '', function ($query) use ($where) {
50
-            $query->where('type',$where['type']);
50
+            $query->where('type', $where['type']);
51 51
         })->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
52 52
             $query->where('status', $where['status']);
53 53
         })->when(isset($where['realname']) && $where['realname'] !== '', function ($query) use ($where) {
54
-            $query->where('realname','like', '%'.$where['realname'].'%');
54
+            $query->where('realname', 'like', '%' . $where['realname'] . '%');
55 55
         })->when(isset($where['is_del']) && $where['is_del'] !== '', function ($query) use ($where) {
56
-            $query->where('is_del',$where['is_del']);
56
+            $query->where('is_del', $where['is_del']);
57
+        })->when(isset($where['feedback_id']) && $where['feedback_id'] !== '', function ($query) use ($where) {
58
+            $query->where('feedback_id', 'in', $where['feedback_id']);
57 59
         });
58 60
     }
59 61
 

+ 18 - 0
app/common/model/shared/SharedProsperityUserGroupLog.php

@@ -0,0 +1,18 @@
1
+<?php
2
+
3
+namespace app\common\model\shared;
4
+
5
+use app\common\model\BaseModel;
6
+
7
+class SharedProsperityUserGroupLog extends BaseModel
8
+{
9
+    public static function tablePk(): ?string
10
+    {
11
+        return 'id';
12
+    }
13
+
14
+    public static function tableName(): string
15
+    {
16
+        return 'shared_prosperity_user_group_log';
17
+    }
18
+}

+ 29 - 0
app/common/model/store/order/PickUp.php

@@ -0,0 +1,29 @@
1
+<?php
2
+
3
+/**
4
+ * @package merchant
5
+ *
6
+ * @author cabbage
7
+ * @day 2020/11/10
8
+ **/
9
+
10
+namespace app\common\model\store\order;
11
+
12
+
13
+use app\common\model\BaseModel;
14
+
15
+class PickUp extends BaseModel
16
+{
17
+
18
+    public static function tablePk(): ?string
19
+    {
20
+        return 'id';
21
+    }
22
+
23
+    public static function tableName(): string
24
+    {
25
+        return 'pick_up_address';
26
+    }
27
+
28
+
29
+}

+ 11 - 0
app/common/model/store/order/StoreOrder.php

@@ -88,4 +88,15 @@ class StoreOrder extends BaseModel
88 88
             ->where('type', '=', SharedProsperityRewardRecordEnum::TYPE['PV']['code'])
89 89
             ->where('pm', '=', SharedProsperityRewardRecordEnum::PM['INCOME']['code']);
90 90
     }
91
+
92
+    public function pickUp()
93
+    {
94
+        return $this->hasOne(PickUp::class, 'id', 'pick_up_id');
95
+    }
96
+
97
+    public function takeStatus()
98
+    {
99
+        return $this->hasOne(StoreOrderStatus::class,'order_id','order_id')
100
+            ->where('change_type', '=', 'take');
101
+    }
91 102
 }

+ 6 - 0
app/common/model/user/Feedback.php

@@ -43,4 +43,10 @@ class Feedback extends BaseModel
43 43
     {
44 44
         return $this->hasOne(FeedBackCategory::class,'feedback_category_id','type');
45 45
     }
46
+
47
+
48
+    public function getReply()
49
+    {
50
+        return $this->hasMany(FeedbackReply::class, 'feedback_id', 'feedback_id');
51
+    }
46 52
 }

+ 51 - 0
app/common/repositories/shared/SharedProsperityUserRepository.php

@@ -5,6 +5,7 @@ namespace app\common\repositories\shared;
5 5
 use app\common\dao\shared\SharedProsperityGroupUserDao;
6 6
 use app\common\dao\shared\SharedProsperityRewardRecordDao;
7 7
 use app\common\dao\shared\SharedProsperityUserDao;
8
+use app\common\dao\shared\SharedProsperityUserGroupLogDao;
8 9
 use app\common\dao\shared\SharedProsperityUserLevelLogDao;
9 10
 use app\common\dao\shared\SharedProsperityUserParentLogDao;
10 11
 use app\common\dao\user\UserDao;
@@ -12,6 +13,8 @@ use app\common\dao\user\UserWithdrawalLimitRecordDao;
12 13
 use app\common\enum\CommonEnum;
13 14
 use app\common\enum\shared\SharedProsperityRewardRecordEnum;
14 15
 use app\common\enum\shared\SharedProsperityUserEnum;
16
+use app\common\model\shared\SharedProsperityGroupUser;
17
+use app\common\model\shared\SharedProsperityUserParentLog;
15 18
 use app\common\repositories\BaseRepository;
16 19
 use app\common\repositories\store\order\StoreCartRepository;
17 20
 use app\common\repositories\store\order\StoreOrderRepository;
@@ -849,6 +852,54 @@ class SharedProsperityUserRepository extends BaseRepository
849 852
         }
850 853
     }
851 854
 
855
+    /**
856
+     * @param $userId
857
+     * @param $groupId
858
+     * @param $remark
859
+     * @param $operator
860
+     * @return string|void
861
+     * @author 史晨
862
+     * @date 2026/3/17 17:19
863
+     * 更新用户分组
864
+     */
865
+    public function updateGroup($userId, $groupId, $remark, $operator)
866
+    {
867
+        $userGroup = SharedProsperityGroupUser::where(['user_id' => $userId, 'status' => 1])->find();
868
+        $userGroupId = $userGroup->group_id??0;
869
+        Db::startTrans();
870
+        try {
871
+            // 变更等级
872
+            if ($userGroup) {
873
+                $update = [
874
+                    'group_id' => $groupId,
875
+                    'status' => 1
876
+                ];
877
+                SharedProsperityGroupUser::update($update, ['user_id' => $userId]);
878
+            }else{
879
+                $insert = [
880
+                    'user_id' => $userId,
881
+                    'group_id' => $groupId,
882
+                    'status' => 1
883
+                ];
884
+                SharedProsperityGroupUser::create($insert);
885
+            }
886
+            // 记录日志
887
+            /** @var SharedProsperityUserGroupLogDao $logDao */
888
+            $logDao = app()->make(SharedProsperityUserGroupLogDao::class);
889
+            $logDao->create([
890
+                'user_id' => $userId,
891
+                'old_group' => $userGroupId,
892
+                'new_group' => $groupId,
893
+                'operator' => $operator,
894
+                'remark' => $remark
895
+            ]);
896
+            Db::commit();
897
+        } catch (\Exception $e) {
898
+            Db::rollback();
899
+            return $e->getMessage();
900
+        }
901
+    }
902
+
852 903
 
853 904
     /**
854 905
      * @param $userId

+ 24 - 0
app/common/repositories/store/order/PickUpRepository.php

@@ -0,0 +1,24 @@
1
+<?php
2
+
3
+namespace app\common\repositories\store\order;
4
+
5
+use app\common\dao\store\order\PickUpDao;
6
+use app\common\repositories\BaseRepository;
7
+
8
+class PickUpRepository extends BaseRepository
9
+{
10
+    /**
11
+     * @param PickUpDao $dao
12
+     */
13
+    public function __construct(PickUpDao $dao)
14
+    {
15
+        $this->dao = $dao;
16
+        $this->source = request()->header('source');
17
+        $this->merId = request()->header('merId');
18
+    }
19
+
20
+    public function getlist()
21
+    {
22
+        return $this->dao->selectWhere(['status'=>1]);
23
+    }
24
+}

+ 9 - 7
app/common/repositories/store/order/StoreGroupOrderRepository.php

@@ -422,15 +422,17 @@ class StoreGroupOrderRepository extends BaseRepository
422 422
             throw new ValidateException('获取当前用户信息失败');
423 423
         }
424 424
 
425
-        /** 验证 收货地址 */
425
+        /** 验证 收货地址 会员专区,共富区可自提,如果选的自提不验证收货地址 */
426 426
         /** @var UserAddressRepository $userAddressRepository */
427 427
         $userAddressRepository = app()->make(UserAddressRepository::class);
428 428
         $addressEntity = $userAddressRepository->getAddressEntityByAddressId($storeOrderCreateRequestEntity->getAddressId());
429
-        if (empty($addressEntity->getAddressId()) || $addressEntity->getUid() != $storeOrderCreateRequestEntity->getUid()) {
430
-            throw new ValidateException('请选择正确的收货地址');
431
-        }
432
-        if (empty($addressEntity->getCodeList())) {
433
-            throw new ValidateException('地址需要选择4级地址!请修改地址!');
429
+        if ($storeOrderCreateRequestEntity->getPickUpId() == 0) {
430
+            if (empty($addressEntity->getAddressId()) || $addressEntity->getUid() != $storeOrderCreateRequestEntity->getUid()) {
431
+                throw new ValidateException('请选择正确的收货地址');
432
+            }
433
+            if (empty($addressEntity->getCodeList())) {
434
+                throw new ValidateException('地址需要选择4级地址!请修改地址!');
435
+            }
434 436
         }
435 437
 
436 438
         /** 验证 购物车信息 */
@@ -804,7 +806,7 @@ class StoreGroupOrderRepository extends BaseRepository
804 806
                         ->setPension($productEntity->getPension())
805 807
                         ->setAttrValuePensionNum($productAttrValueEntity->getPensionNum())
806 808
                         ->toArray()
807
-                );
809
+                )->setPickUpId($storeOrderCreateRequestEntity->getPickUpId());
808 810
             $storeOrderEntityList[] = $storeOrderEntity;
809 811
         }
810 812
 

+ 4 - 3
app/common/repositories/store/order/StoreOrderRepository.php

@@ -2718,7 +2718,7 @@ class StoreOrderRepository extends BaseRepository
2718 2718
 //        if ($uid) $where['uid'] = $uid;
2719 2719
 
2720 2720
         $data = $this->dao->search($where)->where('order_sn', $id)->where('is_del', 0)->with([
2721
-            'orderProduct', 'merchant' => function ($query) {
2721
+            'orderProduct','pickUp', 'merchant' => function ($query) {
2722 2722
                 return $query->field('mer_id,mer_name,mer_avatar,business_id');
2723 2723
             }
2724 2724
         ])
@@ -5048,7 +5048,7 @@ class StoreOrderRepository extends BaseRepository
5048 5048
                 $query->field('uid,real_name,nickname');
5049 5049
             }, 'StoreRefundOrder' => function ($query) {
5050 5050
                 return $query->field('*');
5051
-            }
5051
+            }, 'pickUp','takeStatus'
5052 5052
         ]);
5053 5053
 
5054 5054
         $data = $data->toArray();
@@ -5166,7 +5166,8 @@ class StoreOrderRepository extends BaseRepository
5166 5166
         unset($where['status']);
5167 5167
         $query_search = $this->dao->search($where)
5168 5168
             // 屏蔽测试账号
5169
-            ->whereNotIn('uid', [766, 783, 6])
5169
+            // ->whereNotIn('uid', [766, 783, 6])
5170
+            ->whereNotIn('uid', [ 783, 6])
5170 5171
             ->when(isset($where['order_ids']) && $where['order_ids'] != '', function ($q) use ($where) {
5171 5172
             $q->whereIn('order_id', $where['order_ids']);
5172 5173
         });

+ 47 - 4
app/common/repositories/user/FeedbackRepository.php

@@ -13,8 +13,10 @@ namespace app\common\repositories\user;
13 13
 
14 14
 use app\common\dao\user\FeedbackDao;
15 15
 use app\common\dao\user\FeedbackReplyDao;
16
+use app\common\model\user\Feedback;
16 17
 use app\common\model\user\FeedbackReply;
17 18
 use app\common\repositories\BaseRepository;
19
+use think\facade\Db;
18 20
 
19 21
 /**
20 22
  * Class FeedbackRepository
@@ -36,24 +38,52 @@ class FeedbackRepository extends BaseRepository
36 38
 
37 39
     public function getList(array $where, $page, $limit)
38 40
     {
39
-        $query = $this->dao->search($where)->with(['type' => function($query){
41
+        $query = $this->dao->search($where)->with(['type' => function ($query) {
40 42
             $query->field('feedback_category_id,cate_name');
41 43
         }]);
42 44
 
43 45
         $count = $query->count();
44
-        $list = $query->page($page, $limit)->order("feedback_id desc")->withAttr('images',function($val){
46
+        $list = $query->page($page, $limit)->order("feedback_id desc")->withAttr('images', function ($val) {
45 47
             return $val ? json_decode($val, true) : [];
46 48
         })->select();
49
+
50
+        foreach ($list as &$item) {
51
+            $userReply = Db::name('feedback_reply')
52
+                ->where(['feedback_id' => $item['feedback_id']])
53
+                ->where(['admin_read' => 0])
54
+                ->find();
55
+            $item['userReply'] = $userReply ? 1 : 0;
56
+        }
57
+
47 58
         return compact('count', 'list');
48 59
     }
49 60
 
50
-    public function get( $id)
61
+    public function getReplyList($userId, $page, $limit)
51 62
     {
52
-        $data = $this->dao->getWhere([$this->dao->getPk() => $id]);
63
+
64
+        $feedbackIds = Db::name('feedback')
65
+            ->alias('feed')
66
+            ->leftJoin('feedback_reply reply', 'feed.feedback_id = reply.feedback_id')
67
+            ->where(['feed.uid' => $userId,'reply.user_read' => 0])
68
+            ->group('feed.feedback_id')
69
+            ->field('feed.feedback_id')
70
+            ->select()
71
+            ->toArray();
72
+        $feedbackIds = array_column($feedbackIds,'feedback_id');
73
+        return $this->getList(['feedback_id'=>$feedbackIds], $page, $limit);
74
+    }
75
+
76
+    public function get($id, $read = 'user_read')
77
+    {
78
+        // 获取反馈信息
79
+        $data = $this->dao->getWhere([$this->dao->getPk() => $id], '*', ['getReply']);
53 80
         $type = app()->make(FeedBackCategoryRepository::class)->getWhere(['feedback_category_id' => $data['type']]);
54 81
         $parent = app()->make(FeedBackCategoryRepository::class)->getWhere(['feedback_category_id' => $type['pid']]);
55 82
         $data['type'] = $type['cate_name'];
56 83
         $data['category'] = $parent['cate_name'];
84
+
85
+        // 更改已读状态
86
+        $this->read($id, $read);
57 87
         return $data;
58 88
     }
59 89
 
@@ -73,7 +103,20 @@ class FeedbackRepository extends BaseRepository
73 103
             'uid' => $userId,
74 104
             'content' => $content,
75 105
         ];
106
+        if ($userId == 0) $insert['admin_read'] = 1;
76 107
         return FeedbackReply::insert($insert);
77 108
     }
78 109
 
110
+    /**
111
+     * @param $feedbackId
112
+     * @param $type
113
+     * @return void
114
+     * @author 史晨
115
+     * @date 2026/3/17 14:37
116
+     * 更改已读状态
117
+     */
118
+    public function read($feedbackId, $type)
119
+    {
120
+        FeedbackReply::update([$type => 1], ['feedback_id' => $feedbackId]);
121
+    }
79 122
 }

+ 24 - 0
app/controller/admin/system/sharedProsperity/SharedProsperityUser.php

@@ -82,4 +82,28 @@ class SharedProsperityUser
82 82
         }
83 83
         return app('json')->success('更新成功');
84 84
     }
85
+
86
+    /**
87
+     * @return mixed
88
+     * @throws \think\db\exception\DataNotFoundException
89
+     * @throws \think\db\exception\DbException
90
+     * @throws \think\db\exception\ModelNotFoundException
91
+     * @author 史晨
92
+     * @date 2026/3/17 17:18
93
+     * 更新用户分组
94
+     */
95
+    public function updateGroup()
96
+    {
97
+        /** @var SharedProsperityUserRepository $repository */
98
+        $repository = app()->make(SharedProsperityUserRepository::class);
99
+        $params = app('request')->params(['user_id', 'group_id', 'remark']);
100
+        if (empty($params['user_id']) || empty($params['group_id'] || empty($params['remark']))) {
101
+            return app('json')->fail('参数错误');
102
+        }
103
+        $res = $repository->updateGroup($params['user_id'], $params['group_id'], $params['remark'], request()->adminId());
104
+        if (is_string($res)) {
105
+            return app('json')->fail($res);
106
+        }
107
+        return app('json')->success('更新成功');
108
+    }
85 109
 }

+ 5 - 4
app/controller/admin/user/FeedBack.php

@@ -47,9 +47,9 @@ class FeedBack extends BaseController
47 47
      */
48 48
     public function detail($id)
49 49
     {
50
-        if (!$this->repository->fieldExists('feedback_id',$id))
50
+        if (!$this->repository->fieldExists('feedback_id', $id))
51 51
             return app('json')->fail('数据不存在');
52
-        $feedback = $this->repository->get($id)->toArray();
52
+        $feedback = $this->repository->get($id, 'admin_read')->toArray();
53 53
         //[$feedback['category'], $feedback['type']] = explode('/', $feedback['type'], 2);
54 54
         return app('json')->success($feedback);
55 55
     }
@@ -62,11 +62,12 @@ class FeedBack extends BaseController
62 62
      */
63 63
     public function reply($id)
64 64
     {
65
-        if (!$this->repository->fieldExists('feedback_id',$id))
65
+        if (!$this->repository->fieldExists('feedback_id', $id))
66 66
             return app('json')->fail('数据不存在');
67 67
         $data = $this->request->params(['reply', 'remake', 'status']);
68 68
         $data['reply_time'] = date("Y-m-d H:i:s");
69
-        $this->repository->update($id,$data);
69
+        $this->repository->update($id, $data);
70
+        $this->repository->reply($id, 0,$data['reply']);
70 71
         return app('json')->success('回复成功');
71 72
     }
72 73
 

+ 14 - 0
app/controller/api/store/order/StoreOrder.php

@@ -13,6 +13,7 @@ namespace app\controller\api\store\order;
13 13
 
14 14
 use app\common\model\store\order\StoreRefundOrder;
15 15
 use app\common\repositories\merchant\MerchantRepository;
16
+use app\common\repositories\store\order\PickUpRepository;
16 17
 use app\common\repositories\store\product\ProductAttrValueRepository;
17 18
 use app\common\repositories\user\UserAddressRepository;
18 19
 use app\entity\request\api\store\order\CalculatePostageRequestEntity;
@@ -1991,4 +1992,17 @@ class StoreOrder extends BaseController
1991 1992
             'postage' => $postage
1992 1993
         ]);
1993 1994
     }
1995
+
1996
+    /**
1997
+     * @param PickUpRepository $pickUpRepository
1998
+     * @return mixed
1999
+     * @author 史晨
2000
+     * @date 2026/3/18 15:07
2001
+     * 提货点列表
2002
+     */
2003
+    public function pickUpList(PickUpRepository $pickUpRepository)
2004
+    {
2005
+        $list = $pickUpRepository->getlist();
2006
+        return app('json')->success($list);
2007
+    }
1994 2008
 }

+ 4 - 2
app/controller/api/user/Feedback.php

@@ -52,8 +52,10 @@ class Feedback
52 52
      */
53 53
     public function feedbackList()
54 54
     {
55
-        [$page, $limit] = $this->getPage();
56
-        return app('json')->success($this->repository->getList(['uid' => request()->uid(), 'is_del' => 0], $page, $limit));
55
+        $data = request()->params(['page', 'limit']);
56
+        $list = $this->repository->getList(['uid' => request()->uid(), 'is_del' => 0], $data['page'] ?? 1, $data['limit'] ?? 20);
57
+        $reply = $this->repository->getReplyList(request()->uid(), $data['page'] ?? 1, $data['limit'] ?? 20);
58
+        return app('json')->success(['list' => $list, 'replyList' => $reply]);
57 59
     }
58 60
 
59 61
     public function detail($id)

+ 11 - 6
app/controller/api/user/UserAddress.php

@@ -71,16 +71,21 @@ class UserAddress extends BaseController
71 71
     public function new_create(validate $validate)
72 72
     {
73 73
         $data = $this->checkParams($validate);
74
-        if($data['is_default']){
74
+        if ($data['is_default']) {
75 75
             $this->repository->changeDefault($this->request->uid());
76 76
         } else {
77
-            if(!$this->repository->defaultExists($this->request->uid()))$data['is_default'] = 1;
77
+            if (!$this->repository->defaultExists($this->request->uid())) $data['is_default'] = 1;
78 78
         }
79
-        if($data['address_id']){
80
-            if(!$this->repository->fieldExists($data['address_id'],$this->request->uid()))
79
+        if (!$data['code_list']) {
80
+            return app('json')->fail('请选择完整地址');
81
+        }
82
+        if ($data['address_id']) {
83
+            if (!$this->repository->fieldExists($data['address_id'], $this->request->uid())) {
81 84
                 return app('json')->fail('信息不存在');
82
-            $this->repository->update($data['address_id'],$data);
83
-            return app('json')->success('编辑成功', ['address_id'=>$data['address_id']]);
85
+            }
86
+
87
+            $this->repository->update($data['address_id'], $data);
88
+            return app('json')->success('编辑成功', ['address_id' => $data['address_id']]);
84 89
         };
85 90
         $data['uid'] = $this->request->uid();
86 91
         $address = $this->repository->create($data);

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

@@ -101,6 +101,8 @@ class StoreOrderEntity extends DataEntity
101 101
     public $fzonePayType = null;
102 102
     public $pensionJson = null; // 养老金设置(将当前商品的养老金分配设置保存一份)
103 103
 
104
+    public $pickUpId = null;
105
+
104 106
     /**
105 107
      * @return mixed
106 108
      */
@@ -1771,6 +1773,17 @@ class StoreOrderEntity extends DataEntity
1771 1773
         return $this;
1772 1774
     }
1773 1775
 
1776
+    public function getPickUpId()
1777
+    {
1778
+        return $this->pickUpId;
1779
+    }
1780
+
1781
+    public function setPickUpId($pickUpId): StoreOrderEntity
1782
+    {
1783
+        $this->pickUpId = $pickUpId;
1784
+        return $this;
1785
+    }
1786
+
1774 1787
     public function deconstructionFzonePaytype()
1775 1788
     {
1776 1789
         if (!empty($this->getFzonePayType()) && is_array(json_decode($this->getFzonePayType(), true))) {

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

@@ -15,6 +15,7 @@ class StoreOrderCreateRequestEntity extends RequestCommonEntity
15 15
     public $fzonePayType = [];
16 16
     public $shareId = 0;
17 17
     public $uid = 0;
18
+    public $pickUpId = 0;
18 19
 
19 20
     public function getCartId(): int
20 21
     {
@@ -124,4 +125,15 @@ class StoreOrderCreateRequestEntity extends RequestCommonEntity
124 125
         $this->uid = $uid;
125 126
         return $this;
126 127
     }
128
+
129
+    public function getPickUpId():int
130
+    {
131
+        return $this->pickupId;
132
+    }
133
+
134
+    public function setPickUpId(int $pickupId): StoreOrderCreateRequestEntity
135
+    {
136
+        $this->pickupId = $pickupId;
137
+        return $this;
138
+    }
127 139
 }

+ 7 - 4
app/validate/api/store/order/StoreOrderCreateValidate.php

@@ -14,10 +14,11 @@ class StoreOrderCreateValidate extends CommonValidate
14 14
         'cart_id' => 'require|integer',
15 15
         'cart_id_list' => 'array',
16 16
         'fzone_paytype' => 'require',
17
-        'address_id' => 'require|integer|gt:0',
17
+        'address_id' => 'require|integer',
18 18
         'pay_type' => 'require|integer',
19 19
         'share_id' => 'integer',
20
-        'mark' => 'string'
20
+        'mark' => 'string',
21
+        'pick_up_id' => 'require|integer'
21 22
     ];
22 23
 
23 24
     protected $message = [
@@ -28,11 +29,13 @@ class StoreOrderCreateValidate extends CommonValidate
28 29
         // 'fzone_paytype.string' => '支付方式必须是字符串!',
29 30
         'address_id.require' => '地址ID不能为空!',
30 31
         'address_id.integer' => '地址ID必须是整数!',
31
-        'address_id.gt' => '地址ID必须大于0!',
32
+        // 'address_id.gt' => '地址ID必须大于0!',
32 33
         'pay_type.require' => '支付方式不能为空!',
33 34
         'pay_type.integer' => '支付方式类型错误!',
34 35
         'share_id.integer' => 'share_id 必须是整数!',
35
-        'mark.string' => '备注类型错误'
36
+        'mark.string' => '备注类型错误',
37
+        'pick_up_id.require' => '缺少提货点ID参数!',
38
+        'pick_up_id.integer' => '提货点ID必须是整数!',
36 39
     ];
37 40
 
38 41
     /**

+ 2 - 0
route/admin.php

@@ -126,6 +126,8 @@ Route::group(config('admin.api_admin_prefix') . '/', function () {
126 126
         Route::get('sharedProsperity/user/updateReward', 'admin.system.sharedProsperity.SharedProsperityUser/updateReward');
127 127
         // 修改共富会员上级
128 128
         Route::get('sharedProsperity/user/updateParent', 'admin.system.sharedProsperity.SharedProsperityUser/updateParent');
129
+        // 修改共富团队等级
130
+        Route::get('sharedProsperity/user/updateGroup', 'admin.system.sharedProsperity.SharedProsperityUser/updateGroup');
129 131
 
130 132
         //组合数据
131 133
         Route::group('group', function () {

+ 2 - 1
route/api.php

@@ -124,7 +124,8 @@ Route::group('api/', function () {
124 124
             Route::get('check_group_order/:id', '/check_group_order');
125 125
             //代付商品分享图片
126 126
             Route::get('order_pay_share','/order_pay_share');
127
-
127
+            // 提货点
128
+            Route::get('pick_up_list','/pickUpList');
128 129
 
129 130
         })->prefix('api.store.order.StoreOrder');
130 131