From b7cf4c28a76f55604e28ba2bc33849626bb56869 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 17 Jan 2020 17:13:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/ApplyService.class.php | 7 +++++++ Application/Home/Controller/ApplyController.class.php | 1 - Application/Home/Controller/HomeController.class.php | 1 + Application/Home/Controller/PackageController.class.php | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Application/Base/Service/ApplyService.class.php b/Application/Base/Service/ApplyService.class.php index 2ec917e78..78ec3a71e 100644 --- a/Application/Base/Service/ApplyService.class.php +++ b/Application/Base/Service/ApplyService.class.php @@ -212,4 +212,11 @@ class ApplyService { return false; } } + + public function getSociatyGameIds($promote) + { + $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); + } } \ No newline at end of file diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php index c781cdaab..6a13f64ea 100644 --- a/Application/Home/Controller/ApplyController.class.php +++ b/Application/Home/Controller/ApplyController.class.php @@ -117,7 +117,6 @@ class ApplyController extends BaseController if (count($gameIdList) > 0) { $gameIds = implode(',', $gameIdList); - $map['tab_game.id'] = ['in', $gameIds]; } else { $map = '1 = 2'; diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 0d2991cbf..bebcfdef1 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -173,6 +173,7 @@ class HomeController extends Controller $columns = [ 'id', 'sdk_version', + 'apply_auth', 'icon', 'screenshot', 'relation_game_id', diff --git a/Application/Home/Controller/PackageController.class.php b/Application/Home/Controller/PackageController.class.php index 09f09ed18..f3bc2db6c 100644 --- a/Application/Home/Controller/PackageController.class.php +++ b/Application/Home/Controller/PackageController.class.php @@ -65,7 +65,7 @@ class PackageController extends Controller } $promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find(); - $game = M('game','tab_')->field(['id', 'game_name', 'sdk_version'])->where(['id' => $apply['game_id']])->find(); + $game = M('game','tab_')->field(['id', 'game_name', 'sdk_version', 'apply_auth'])->where(['id' => $apply['game_id']])->find(); if (!$applyService->checkSociatyPerm($promote, $game)) { $this->redirect("package/downloadError", ['message' => '该链接已经停止使用']); }