From 32baf07c71e4dff143fb7d260db88b3ad960ceb2 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 22 Jun 2024 15:50:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=B9=E6=8D=AE=E7=94=A8=E6=88=B7ID?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=94=A8=E6=88=B7=E7=AD=89=E7=BA=A7=E5=92=8C?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user_label/UserLabelController.php | 32 +++++++++++++++++++ .../user_ship/UserShipController.php | 31 ++++++++++++++++++ app/common/lists/user/UserShipLists.php | 8 +++-- .../lists/store_order/StoreOrderLists.php | 2 +- 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 app/api/controller/user_label/UserLabelController.php create mode 100644 app/api/controller/user_ship/UserShipController.php diff --git a/app/api/controller/user_label/UserLabelController.php b/app/api/controller/user_label/UserLabelController.php new file mode 100644 index 000000000..545f5f9d0 --- /dev/null +++ b/app/api/controller/user_label/UserLabelController.php @@ -0,0 +1,32 @@ +request->__set('id',1); + return $this->dataLists(new UserLabelLists()); + } + + +} \ No newline at end of file diff --git a/app/api/controller/user_ship/UserShipController.php b/app/api/controller/user_ship/UserShipController.php new file mode 100644 index 000000000..f6b2b9c42 --- /dev/null +++ b/app/api/controller/user_ship/UserShipController.php @@ -0,0 +1,31 @@ +request->__set('id',1); + return $this->dataLists(new UserShipLists()); + } + + +} \ No newline at end of file diff --git a/app/common/lists/user/UserShipLists.php b/app/common/lists/user/UserShipLists.php index e4ea31103..4e3643d7f 100644 --- a/app/common/lists/user/UserShipLists.php +++ b/app/common/lists/user/UserShipLists.php @@ -38,8 +38,12 @@ class UserShipLists extends BaseAdminDataLists { $field = "id,title"; - $arr[]=['id'=>0,'title'=>'一般用户']; - + $arr=[]; + if($this->request->__get('id')){ + $this->searchWhere[]=['id','in',[1,4]]; + }else{ + $arr=['id'=>0,'title'=>'一般用户']; + } $lists = UserShip::where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->field($field) diff --git a/app/store/lists/store_order/StoreOrderLists.php b/app/store/lists/store_order/StoreOrderLists.php index bfb821a4e..db3af46d6 100644 --- a/app/store/lists/store_order/StoreOrderLists.php +++ b/app/store/lists/store_order/StoreOrderLists.php @@ -47,9 +47,9 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface public function lists(): array { $store_id = $this->adminInfo['store_id']??5; - $this->searchWhere[] = ['store_id' ,'=',$store_id]; $is_sashier=$this->request->get('is_sashier'); if($is_sashier==1){//收银台订单 + $this->searchWhere[] = ['store_id' ,'=',$store_id]; $this->searchWhere[] = ['pay_type','in',[17,9,13,18]]; }elseif($is_sashier==2){//小程序订单 $this->searchWhere[] = ['pay_type','in',[7,3,18]];