From 5f40abf3af8a154b2aaa18bfe7d3cfb2d3b6eae2 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Thu, 10 Jan 2019 11:43:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Message.php | 1 - application/api/controller/Userintegral.php | 1 - application/index/controller/Message.php | 1 - application/index/controller/Userintegral.php | 1 - application/service/IntegralService.php | 13 +++---------- application/service/MessageService.php | 13 +++---------- 6 files changed, 6 insertions(+), 24 deletions(-) diff --git a/application/api/controller/Message.php b/application/api/controller/Message.php index 1a362f69c..c1343a6eb 100755 --- a/application/api/controller/Message.php +++ b/application/api/controller/Message.php @@ -49,7 +49,6 @@ class Message extends Common // 参数 $params = $this->data_post; $params['user'] = $this->user; - $params['user_type'] = 'user'; // 消息更新未已读 MessageService::MessageRead($params); diff --git a/application/api/controller/Userintegral.php b/application/api/controller/Userintegral.php index 68f95a352..c95b3cee2 100755 --- a/application/api/controller/Userintegral.php +++ b/application/api/controller/Userintegral.php @@ -50,7 +50,6 @@ class UserIntegral extends Common // 参数 $params = $this->data_post; $params['user'] = $this->user; - $params['user_type'] = 'user'; // 分页 $number = 10; diff --git a/application/index/controller/Message.php b/application/index/controller/Message.php index 65ec66ce6..d9936998d 100755 --- a/application/index/controller/Message.php +++ b/application/index/controller/Message.php @@ -50,7 +50,6 @@ class Message extends Common // 参数 $params = input(); $params['user'] = $this->user; - $params['user_type'] = 'user'; // 消息更新未已读 MessageService::MessageRead($params); diff --git a/application/index/controller/Userintegral.php b/application/index/controller/Userintegral.php index 49b060889..1e4808e4f 100755 --- a/application/index/controller/Userintegral.php +++ b/application/index/controller/Userintegral.php @@ -50,7 +50,6 @@ class UserIntegral extends Common // 参数 $params = input(); $params['user'] = $this->user; - $params['user_type'] = 'user'; // 分页 $number = 10; diff --git a/application/service/IntegralService.php b/application/service/IntegralService.php index 56bf23d78..18618548b 100755 --- a/application/service/IntegralService.php +++ b/application/service/IntegralService.php @@ -69,20 +69,13 @@ class IntegralService */ public static function UserIntegralLogListWhere($params = []) { - // 用户类型 - $user_type = isset($params['user_type']) ? $params['user_type'] : 'user'; - // 条件初始化 $where = []; - // 用户类型 - if(isset($params['user_type']) && $params['user_type'] == 'user') + // 用户id + if(!empty($params['user'])) { - // 用户id - if(!empty($params['user'])) - { - $where[] = ['user_id', '=', $params['user']['id']]; - } + $where[] = ['user_id', '=', $params['user']['id']]; } if(!empty($params['keywords'])) diff --git a/application/service/MessageService.php b/application/service/MessageService.php index 8a639565a..349c5226b 100755 --- a/application/service/MessageService.php +++ b/application/service/MessageService.php @@ -62,9 +62,6 @@ class MessageService */ public static function MessageListWhere($params = []) { - // 用户类型 - $user_type = isset($params['user_type']) ? $params['user_type'] : 'user'; - // 条件初始化 $where = [ ['is_delete_time', '=', 0], @@ -76,14 +73,10 @@ class MessageService $where[] = ['id', '=', $params['id']]; } - // 用户类型 - if(isset($params['user_type']) && $params['user_type'] == 'user') + // 用户id + if(!empty($params['user'])) { - // 用户id - if(!empty($params['user'])) - { - $where[] = ['user_id', '=', $params['user']['id']]; - } + $where[] = ['user_id', '=', $params['user']['id']]; } // 关键字