feat: 修改GoodsLists.php,添加根据商品名称或分类查询功能

This commit is contained in:
mkm 2024-05-25 16:59:51 +08:00
parent 3b5901c998
commit a5861b0aaa

View File

@ -34,7 +34,7 @@ class GoodsLists extends BaseAdminDataLists implements ListsSearchInterface
if($name && preg_match('/[\x{4e00}-\x{9fff}]+/u', $name)==1){
$where['%like%']=['name'];
}else{
$where['=']=['code'];
$where['=']=['code','class'];
}
return $where;
}
@ -85,6 +85,7 @@ class GoodsLists extends BaseAdminDataLists implements ListsSearchInterface
}else{
$where[]=['class','=',$class_all];
}
}
if(!empty($order_param)){
if($order_param == 'asc'){