mirror of https://gitee.com/karson/fastadmin.git
优化Selectpage的实现方法
parent
0f1ce99a25
commit
43d9883e7d
|
|
@ -295,7 +295,7 @@ class Backend extends Controller
|
||||||
$sym = strtoupper(isset($op[$k]) ? $op[$k] : $sym);
|
$sym = strtoupper(isset($op[$k]) ? $op[$k] : $sym);
|
||||||
switch ($sym) {
|
switch ($sym) {
|
||||||
case '=':
|
case '=':
|
||||||
case '!=':
|
case '<>':
|
||||||
$where[] = [$k, $sym, (string)$v];
|
$where[] = [$k, $sym, (string)$v];
|
||||||
break;
|
break;
|
||||||
case 'LIKE':
|
case 'LIKE':
|
||||||
|
|
@ -433,7 +433,7 @@ class Backend extends Controller
|
||||||
//是否返回树形结构
|
//是否返回树形结构
|
||||||
$istree = $this->request->request("isTree", 0);
|
$istree = $this->request->request("isTree", 0);
|
||||||
$ishtml = $this->request->request("isHtml", 0);
|
$ishtml = $this->request->request("isHtml", 0);
|
||||||
if($istree) {
|
if ($istree) {
|
||||||
$word = [];
|
$word = [];
|
||||||
$pagesize = 99999;
|
$pagesize = 99999;
|
||||||
}
|
}
|
||||||
|
|
@ -455,7 +455,11 @@ class Backend extends Controller
|
||||||
}
|
}
|
||||||
if ($custom && is_array($custom)) {
|
if ($custom && is_array($custom)) {
|
||||||
foreach ($custom as $k => $v) {
|
foreach ($custom as $k => $v) {
|
||||||
$query->where($k, '=', $v);
|
if (is_array($v) && 2 == count($v)) {
|
||||||
|
$query->where($k, trim($v[0]), $v[1]);
|
||||||
|
} else {
|
||||||
|
$query->where($k, '=', $v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue