From b4d35af3cba4ab7c6406b89a307222ceaa9ed8bd Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 11 Feb 2020 14:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/ApplyService.class.php | 6 +++++- Application/Home/Controller/ApplyController.class.php | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) 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];