From 0644f665200006643f09603d43b41d3ab59d10c6 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Wed, 27 Nov 2019 10:07:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8Fgame=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DownloadController.class.php | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index c751ca580..43de91eaa 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1295,13 +1295,14 @@ class DownloadController extends BaseController { $map = ['promote_id' => ['in', $ids]]; $subMap = ['promote_id' => ['in', $ids]]; - if ($gameId != 0) { - $gameMap['relation_game_id'] = $gameId; + if ($gameId != 0 || $sdkVersion != 0) { + if ($gameId != 0) { + $gameMap['relation_game_id'] = $gameId; + } if ($sdkVersion != 0) { $gameMap['sdk_version'] = $sdkVersion; } $gameId1 = M('game', 'tab_')->where($gameMap)->getField('id', true); - $map['game_id'] = ['in', $gameId1]; $subMap['game_id'] = ['in', $gameId1]; } @@ -1416,22 +1417,24 @@ class DownloadController extends BaseController { $map['parentsinfo'] = json_encode($parent,FALSE);; $map['currentDisplay'] = $currentDisplay; $map['ids'] = $ids; - if ($gameId > 0) { - $gameMap['relation_game_id'] = $gameId; - if ($sdkVersion > 0) { + if ($gameId != 0 || $sdkVersion != 0) { + if ($gameId != 0) { + $gameMap['relation_game_id'] = $gameId; + } + if ($sdkVersion != 0) { $gameMap['sdk_version'] = $sdkVersion; } $gameId1 = M('game', 'tab_')->where($gameMap)->getField('id', true); - $params['game_id'] = ['in', $gameId1]; + $map['game_id'] = ['in', $gameId1]; } if ($serverId > 0) { - $params['server_id'] = $serverId; + $map['server_id'] = $serverId; } if ($sdkVersion > 0) { - $params['sdk_version'] = $sdkVersion; + $map['sdk_version'] = $sdkVersion; } if ($status > 0) { - $params['lock_status'] = $status; + $map['lock_status'] = $status; } list($beginTime, $endTime) = $this->getBetweenTime($time); $map['begin_time'] = $beginTime;