mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
查询支持一个字段多次查询条件
This commit is contained in:
@@ -931,11 +931,16 @@ class Query
|
|||||||
$where[$field] = ['eq', $op];
|
$where[$field] = ['eq', $op];
|
||||||
} else {
|
} else {
|
||||||
$where[$field] = [$op, $condition];
|
$where[$field] = [$op, $condition];
|
||||||
|
// 记录一个字段多次查询条件
|
||||||
|
$this->options['multi'][$field][] = $where[$field];
|
||||||
}
|
}
|
||||||
if (!empty($where)) {
|
if (!empty($where)) {
|
||||||
if (!isset($this->options['where'][$logic])) {
|
if (!isset($this->options['where'][$logic])) {
|
||||||
$this->options['where'][$logic] = [];
|
$this->options['where'][$logic] = [];
|
||||||
}
|
}
|
||||||
|
if (isset($this->options['multi'][$field]) && count($this->options['multi'][$field]) > 1) {
|
||||||
|
$where[$field] = $this->options['multi'][$field];
|
||||||
|
}
|
||||||
$this->options['where'][$logic] = array_merge($this->options['where'][$logic], $where);
|
$this->options['where'][$logic] = array_merge($this->options['where'][$logic], $where);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user