From 9ecc587a9ccc97fd1978b96e74e2ec1b55cdd7fe Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 1 Nov 2019 16:23:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E8=AF=BB=E6=B6=88=E6=81=AF=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/UserController.class.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 6278a995..bc0ec0ae 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -56,17 +56,7 @@ class UserController extends BaseController $small_list = $this -> small_list($user['user_id'], $user['game_id']); $small_list[] = array('is_platform' => $platform, 'user_id' => $user['user_id'], 'account' => $user['account'], 'user_account' => $user['account']); $unread_count = 0; - $time = time(); - $notice = M('notice', 'tab_')->where('start_time < ' . $time . ' AND game_id = ' . $user['game_id']. ' AND (end_time = 0 OR end_time >' . $time . ')')->getField('id',true); - if(!empty($notice)) - { - $unread_count += count($notice); - $where['notice_id'] = ['in', implode(',', $notice)]; - $where['user_id'] = $user['user_id']; - $where['is_read'] = 1; - $notice_read_count = M('notice_read', 'tab_')->where($where)->count(); - $unread_count -= $notice_read_count; - } + $unread_count += M('share_record', 'tab_') -> where(['invite_id' => $user['user_id'], 'award_coin' => ['gt', 0], 'read' => 0]) -> count(); $unread_count += M('point_record', 'tab_') -> where(['type_id' => 6, 'user_id' => $user['user_id'], 'point' => ['gt', 0], 'read' => 0]) -> count(); $notice_count = $unread_count;