mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
feat:自定义公共搜索初始化操作符号支持 !140
This commit is contained in:
parent
d242add400
commit
39df7c2821
@ -188,6 +188,7 @@ class Backend extends Api
|
||||
$search = $this->request->get("search/a", []);
|
||||
$initKey = $this->request->get("initKey/s", $pk);
|
||||
$initValue = $this->request->get("initValue", '');
|
||||
$operator = $this->request->get("operator/s", 'in');
|
||||
|
||||
$where = [];
|
||||
$modelTable = strtolower($this->model->getTable());
|
||||
@ -203,7 +204,7 @@ class Backend extends Api
|
||||
$where[] = [implode("|", $quickSearchArr), "LIKE", '%' . str_replace('%', '\%', $quickSearch) . '%'];
|
||||
}
|
||||
if ($initValue) {
|
||||
$where[] = [$initKey, 'in', $initValue];
|
||||
$where[] = [$initKey, $operator, $initValue];
|
||||
$limit = 999999;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user