From 8b5b2228b240a6881fc79dbf16ff8ac63868c4f9 Mon Sep 17 00:00:00 2001 From: devil Date: Mon, 8 Jun 2020 22:40:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/User.php | 6 ++-- application/service/UserService.php | 44 --------------------------- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/application/admin/controller/User.php b/application/admin/controller/User.php index ef24db071..a2b28b88f 100755 --- a/application/admin/controller/User.php +++ b/application/admin/controller/User.php @@ -119,11 +119,9 @@ class User extends Common */ public function ExcelExport() { - // 条件 - $where = UserService::UserListWhere($this->data_post); - + // 获取数据列表 $data_params = [ - 'where' => $where, + 'where' => $this->form_where, 'm' => 0, 'n' => 0, ]; diff --git a/application/service/UserService.php b/application/service/UserService.php index 22eedfd87..dd6c464cb 100755 --- a/application/service/UserService.php +++ b/application/service/UserService.php @@ -168,50 +168,6 @@ class UserService return DataReturn('处理成功', 0, $data); } - /** - * 用户列表条件 - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-10T22:16:29+0800 - * @param [array] $params [输入参数] - */ - public static function UserListWhere($params = []) - { - $where = []; - if(!empty($params['keywords'])) - { - $where[] =['username|nickname|mobile', 'like', '%'.$params['keywords'].'%']; - } - - // 是否更多条件 - if(isset($params['is_more']) && $params['is_more'] == 1) - { - // 性别 - if(isset($params['gender']) && $params['gender'] > -1) - { - $where[] = ['gender', '=', intval($params['gender'])]; - } - - // 状态 - if(isset($params['status']) && $params['status'] > -1) - { - $where[] = ['status', '=', intval($params['status'])]; - } - - // 时间 - if(!empty($params['time_start'])) - { - $where[] = ['add_time', '>', strtotime($params['time_start'])]; - } - if(!empty($params['time_end'])) - { - $where[] = ['add_time', '<', strtotime($params['time_end'])]; - } - } - return $where; - } - /** * 用户总数 * @author Devil