diff --git a/Application/Base/Service/ApplyService.class.php b/Application/Base/Service/ApplyService.class.php index 78ec3a71e..fc5fb7926 100644 --- a/Application/Base/Service/ApplyService.class.php +++ b/Application/Base/Service/ApplyService.class.php @@ -217,6 +217,10 @@ class ApplyService { { $promoteService = new PromoteService(); $topPromote = $promoteService->getTopPromote($promote); - return M('sociaty_games', 'tab_')->where(['game_id' => $game['id'], 'promote_id' => $topPromote['id']])->getField('game_id', true); + $tempIds = M('sociaty_games', 'tab_')->where(['promote_id' => $topPromote['id']])->getField('game_id', true); + $tempIds = $tempIds ?? []; + $ids = M('game', 'tab_')->where(['apply_auth' => 1])->getField('id', true); + $ids = $ids ?? []; + return array_merge($tempIds, $ids); } } \ No newline at end of file diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php index 6044d0f97..a50f68bb1 100644 --- a/Application/Home/Controller/ApplyController.class.php +++ b/Application/Home/Controller/ApplyController.class.php @@ -92,6 +92,10 @@ class ApplyController extends BaseController $map['tab_game.sdk_version'] = $type; + $applyService = new ApplyService(); + $tempIds = $applyService->getSociatyGameIds($loginPromote); + $gameIdList = array_intersect($gameIdList, $tempIds); + if (count($gameIdList) > 0) { $gameIds = implode(',', $gameIdList); @@ -115,6 +119,10 @@ class ApplyController extends BaseController } else { $gameIdList = M('Game', 'tab_')->group('relation_game_id')->having('count(id) = 2')->getField('id', true); + $applyService = new ApplyService(); + $tempIds = $applyService->getSociatyGameIds($loginPromote); + $gameIdList = array_intersect($gameIdList, $tempIds); + if (count($gameIdList) > 0) { $gameIds = implode(',', $gameIdList); $map['tab_game.id'] = ['in', $gameIds];