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