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", []);
|
$search = $this->request->get("search/a", []);
|
||||||
$initKey = $this->request->get("initKey/s", $pk);
|
$initKey = $this->request->get("initKey/s", $pk);
|
||||||
$initValue = $this->request->get("initValue", '');
|
$initValue = $this->request->get("initValue", '');
|
||||||
|
$operator = $this->request->get("operator/s", 'in');
|
||||||
|
|
||||||
$where = [];
|
$where = [];
|
||||||
$modelTable = strtolower($this->model->getTable());
|
$modelTable = strtolower($this->model->getTable());
|
||||||
@ -203,7 +204,7 @@ class Backend extends Api
|
|||||||
$where[] = [implode("|", $quickSearchArr), "LIKE", '%' . str_replace('%', '\%', $quickSearch) . '%'];
|
$where[] = [implode("|", $quickSearchArr), "LIKE", '%' . str_replace('%', '\%', $quickSearch) . '%'];
|
||||||
}
|
}
|
||||||
if ($initValue) {
|
if ($initValue) {
|
||||||
$where[] = [$initKey, 'in', $initValue];
|
$where[] = [$initKey, $operator, $initValue];
|
||||||
$limit = 999999;
|
$limit = 999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user