From adfb50aff51ecaf5233f1668d9f89097254778d6 Mon Sep 17 00:00:00 2001 From: hdm Date: Tue, 5 Jul 2022 14:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E4=BB=AC=E8=B0=83=E5=8A=A8=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=95=B0=E6=8D=AEbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/user/controller/Personal.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/user/controller/Personal.php b/app/user/controller/Personal.php index a04a3cb..26935ce 100644 --- a/app/user/controller/Personal.php +++ b/app/user/controller/Personal.php @@ -23,10 +23,11 @@ class Personal extends BaseController { if (request()->isAjax()) { $param = get_params(); + $where = []; if (!empty($param['keywords'])) { - $where['u.name|p.remark|a.title|b.title'] = ['like', '%' . $param['keywords'] . '%']; + $where[] = ['u.name|p.remark|a.title|b.title','like', '%' . $param['keywords'] . '%']; } - $where['p.status'] = array('eq', 1); + $where[] = ['p.status','=', 1]; $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; $list = DepartmentChange::where($where) ->field('p.*,u.name as name,ad.name as admin,a.title as adepartment,b.title as bdepartment')