|
|
|
@ -32,7 +32,7 @@ class UserService
|
|
|
|
|
}
|
|
|
|
|
$user = $result['data']['user'];
|
|
|
|
|
|
|
|
|
|
$noticeCount = $this->getNoticeCount($user);
|
|
|
|
|
$noticeCount = $this->getNoticeCount($user, $game);
|
|
|
|
|
$this->addUserPlay($user, $game, $clientIp);
|
|
|
|
|
|
|
|
|
|
$response = [
|
|
|
|
@ -343,12 +343,12 @@ class UserService
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function getNoticeCount($user)
|
|
|
|
|
protected function getNoticeCount($user, $game)
|
|
|
|
|
{
|
|
|
|
|
$noticeCount = 0;
|
|
|
|
|
$time = time();
|
|
|
|
|
$noticeIds = M('notice', 'tab_')
|
|
|
|
|
->where('start_time < ' . $time . ' AND game_id = ' . $user['game_id']. ' AND (end_time = 0 OR end_time >' . $time . ')')
|
|
|
|
|
->where('start_time < ' . $time . ' AND game_id = ' . $game['id']. ' AND (end_time = 0 OR end_time >' . $time . ')')
|
|
|
|
|
->getField('id',true);
|
|
|
|
|
if(!empty($noticeIds))
|
|
|
|
|
{
|
|
|
|
|