From 7981e126f370b09ffe56443740a436aeb07067e2 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Wed, 19 Jun 2024 16:58:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=B6=E9=93=B6=E6=9C=BA?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=80=BB=E8=BE=91=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lists/store_branch_product/StoreBranchProductLists.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/admin/lists/store_branch_product/StoreBranchProductLists.php b/app/admin/lists/store_branch_product/StoreBranchProductLists.php index cce4193a4..c5b70125e 100644 --- a/app/admin/lists/store_branch_product/StoreBranchProductLists.php +++ b/app/admin/lists/store_branch_product/StoreBranchProductLists.php @@ -57,6 +57,11 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI $where[]=['cate_id','in',array_merge($arr,$arr2)]; } } + if(empty($where) && $class_all){ + //2或者1 + $where[]=['cate_id','=',$class_all]; + } + return StoreBranchProduct::where($this->searchWhere)->where($where) ->field(['id','store_id','product_id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'unit', 'cost','purchase', 'status']) ->when(!empty($this->adminInfo['store_id']), function ($query) {