From 43d9883e7dcc3bfa960f1d2c638d4ac0bef2d69a Mon Sep 17 00:00:00 2001 From: PPPSCN <35696959@qq.com> Date: Sun, 17 Feb 2019 15:25:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Selectpage=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/controller/Backend.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index ab99b3ec..ce3c239c 100644 --- a/application/common/controller/Backend.php +++ b/application/common/controller/Backend.php @@ -295,7 +295,7 @@ class Backend extends Controller $sym = strtoupper(isset($op[$k]) ? $op[$k] : $sym); switch ($sym) { case '=': - case '!=': + case '<>': $where[] = [$k, $sym, (string)$v]; break; case 'LIKE': @@ -433,7 +433,7 @@ class Backend extends Controller //是否返回树形结构 $istree = $this->request->request("isTree", 0); $ishtml = $this->request->request("isHtml", 0); - if($istree) { + if ($istree) { $word = []; $pagesize = 99999; } @@ -455,7 +455,11 @@ class Backend extends Controller } if ($custom && is_array($custom)) { 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); + } } } };