From b9b6598df1eaf8397dc3d43568e8e98700fda233 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 1 Nov 2019 17:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=9A=84=E6=9C=AA=E8=AF=BB?= =?UTF-8?q?=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/NoticeController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Sdk/Controller/NoticeController.class.php b/Application/Sdk/Controller/NoticeController.class.php index d9e875f1..f07cd487 100644 --- a/Application/Sdk/Controller/NoticeController.class.php +++ b/Application/Sdk/Controller/NoticeController.class.php @@ -170,12 +170,12 @@ class NoticeController extends BaseController{ //获取公告未读条数 $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); + $notice = M('notice', 'tab_')->where('start_time < ' . $time . ' AND game_id = ' . $request['game_id']. ' AND (end_time = 0 OR end_time >' . $time . ')')->getField('id',true); if(!empty($notice)) { $data['unread_count'] += count($notice); $where['notice_id'] = ['in', implode(',', $notice)]; - $where['user_id'] = $user['user_id']; + $where['user_id'] = $request['user_id']; $where['is_read'] = 1; $notice_read_count = M('notice_read', 'tab_')->where($where)->count(); $data['unread_count'] -= $notice_read_count;