From 21baf23272ab8f8352c0b0090e95c5d912f2d22b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 25 Sep 2024 17:59:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8API=EF=BC=8C=E5=A2=9E=E5=8A=A0'total=5Fprice'?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BF=AE=E5=A4=8D'is=5Flack'?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lists/branch_product/BranchProductLists.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/api/lists/branch_product/BranchProductLists.php b/app/api/lists/branch_product/BranchProductLists.php index 109f22be7..d74a6a815 100644 --- a/app/api/lists/branch_product/BranchProductLists.php +++ b/app/api/lists/branch_product/BranchProductLists.php @@ -68,24 +68,16 @@ class BranchProductLists extends BaseApiDataLists implements ListsSearchInterfac // } else { // $order = [$field => $order]; // } - $fields = 'id,top_cate_id,cate_id,store_name,cost,vip_price,purchase,price,bar_code,image,sales,store_info,unit,batch,two_cate_id,stock,is_lack'; - - $tag = ''; - - $this->searchWhere[] = ['is_show', '=', 1]; + $fields = 'id,top_cate_id,cate_id,store_name,cost,vip_price,purchase,price,bar_code,image,sales,store_info,unit,batch,two_cate_id,stock,total_price'; + + $this->searchWhere[] = ['status', '=', 1]; $this->searchWhere[] = ['product_type', 'in', [0,4]]; return StoreBranchProduct::where($this->searchWhere) ->field($fields) ->with(['className', 'unitName']) ->limit($this->limitOffset, $this->limitLength) ->order($this->sortOrder) - ->select()->each(function ($item) use ($tag) { - if($item['is_lack']==1){ - $tag='缺货'; - } - $item['tag'] = $tag; - return $item; - }) + ->select() ->toArray(); }