修改搜索条件
This commit is contained in:
parent
ff4ce5197e
commit
8a54e68d8a
@ -30,18 +30,18 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface,Li
|
||||
*/
|
||||
public function setSearch(): array
|
||||
{
|
||||
$name=$this->request->get('name','');
|
||||
$name=$this->request->get('store_name','');
|
||||
// $where['%pipe_like%'] =['name'=>'store_name|bar_code'];
|
||||
if($name){
|
||||
if(preg_match('/[\x{4e00}-\x{9fff}]+/u', $name)==1){
|
||||
$where['%like%']=['store_name'];
|
||||
// $where['%like%']=['name'=>'store_name'];
|
||||
$where['%like%']=['store_name'=>'store_name'];
|
||||
}else{
|
||||
$where['=']=['bar_code','cate_id'];
|
||||
}
|
||||
}else{
|
||||
$where['=']=['store_id','bar_code','cate_id'];
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user