diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 9ecc5f8e2..bfa3f4c86 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1745,8 +1745,10 @@ class QueryController extends BaseController $map = ['uc.promote_id' => ['in', $ids]]; $subMap = ['promote_id' => ['in', $ids]]; - if ($relationGameId != 0) { - $gameMap['relation_game_id'] = $relationGameId; + if ($relationGameId != 0 || $sdkVersion != 0) { + if ($relationGameId != 0) { + $gameMap['relation_game_id'] = $relationGameId; + } if ($sdkVersion != 0) { $gameMap['sdk_version'] = $sdkVersion; } @@ -2000,9 +2002,11 @@ class QueryController extends BaseController 'isContainSubs' => true, 'basicPromotes' => $basicPromotes, ]; - if ($relationGameId > 0) { - $gameMap['relation_game_id'] = $relationGameId; - if ($sdkVersion > 0) { + if ($relationGameId != 0 || $sdkVersion != 0) { + if ($relationGameId != 0) { + $gameMap['relation_game_id'] = $relationGameId; + } + if ($sdkVersion != 0) { $gameMap['sdk_version'] = $sdkVersion; } $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true);