diff --git a/app/api/lists/product/ProductLists.php b/app/api/lists/product/ProductLists.php index 4abfe93cb..a11a486c2 100644 --- a/app/api/lists/product/ProductLists.php +++ b/app/api/lists/product/ProductLists.php @@ -101,7 +101,7 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface,Li $where[]=['cate_id','in',array_merge($arr,$arr2)]; } } - if(empty($where)){ + if(empty($where) && $class_all){ //2或者1 $where[]=['cate_id','=',$class_all]; } @@ -177,7 +177,7 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface,Li $where[]=['cate_id','in',array_merge($arr,$arr2)]; } } - if(empty($where)){ + if(empty($where)&& $class_all){ //2或者1 $where[]=['cate_id','=',$class_all]; }