From bce0a0c8ecd6bdab007aa9b32071c0a10444a00b Mon Sep 17 00:00:00 2001 From: hdm Date: Mon, 28 Mar 2022 15:56:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/User.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index d8634de..56a7164 100644 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -31,14 +31,15 @@ class User extends BaseController if ($start_time > 0 && $end_time > 0) { if ($start_time === $end_time) { - $where['register_time'] = array('eq', $start_time); + $where[] = ['register_time','=',$start_time]; } else { - $where['register_time'] = array(array('egt', $start_time), array('elt', $end_time), 'and'); + $where[] = ['register_time','>=',$start_time]; + $where[] = ['register_time','<=',$end_time]; } } elseif ($start_time > 0 && $end_time == 0) { - $where['register_time'] = array('egt', $start_time); + $where[] = ['register_time','>=',$start_time]; } elseif ($start_time == 0 && $end_time > 0) { - $where['register_time'] = array('elt', $end_time); + $where[] = ['register_time','<=',$end_time]; } $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];