兼容分类查询

This commit is contained in:
liu 2024-06-14 18:19:05 +08:00
parent 41ff69e0d9
commit 6e68525779

View File

@ -101,7 +101,7 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface,Li
$where[]=['cate_id','in',array_merge($arr,$arr2)]; $where[]=['cate_id','in',array_merge($arr,$arr2)];
} }
} }
if(empty($where)){ if(empty($where) && $class_all){
//2或者1 //2或者1
$where[]=['cate_id','=',$class_all]; $where[]=['cate_id','=',$class_all];
} }
@ -177,7 +177,7 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface,Li
$where[]=['cate_id','in',array_merge($arr,$arr2)]; $where[]=['cate_id','in',array_merge($arr,$arr2)];
} }
} }
if(empty($where)){ if(empty($where)&& $class_all){
//2或者1 //2或者1
$where[]=['cate_id','=',$class_all]; $where[]=['cate_id','=',$class_all];
} }