diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 7e4bbc698..3f05a9ed8 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1175,8 +1175,20 @@ class DownloadController extends BaseController { $map['_string'] = '1<>1'; } - empty(I('relation_game_id')) || $map['tab_pay_info.relation_game_id'] = I('relation_game_id'); - empty(I('sdk_version')) || $map['tab_pay_info.sdk_version'] = I('sdk_version'); + // empty(I('relation_game_id')) || $map['tab_pay_info.relation_game_id'] = I('relation_game_id'); + // empty(I('sdk_version')) || $map['tab_pay_info.sdk_version'] = I('sdk_version');relation_game_id + $relation_game_id = I('relation_game_id'); + $sdk_version = I('sdk_version'); + if ($relation_game_id != 0 || $sdk_version != 0) { + if ($relation_game_id != 0) { + $gameMap['relation_game_id'] = $relation_game_id; + } + if ($sdkVersion != 0) { + $gameMap['sdk_version'] = $sdkVersion; + } + $gameId1 = M('game', 'tab_')->where($gameMap)->getField('id', true); + $map['game_id'] = ['in', $gameId1]; + } empty(I('server_id')) || $map['tab_pay_info.server_id'] = I('server_id'); empty(I('game_player_name')) || $map['tab_pay_info.game_player_name'] = ['like', '%' . I('game_player_name') . '%']; empty(I('user_account')) || $map['tab_pay_info.user_account'] = ['like', '%' . I('user_account') . '%']; diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 427ae9b5a..486613b21 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -34,11 +34,15 @@ class PlayersController extends BaseController { $map = []; $map['tab_pay_info.promote_id'] = ['in', $ids]; - if (!empty($relationGameId)) { - $map['tab_pay_info.relation_game_id'] = $relationGameId; - } - if (!empty($sdkVersion)) { - $map['tab_pay_info.sdk_version'] = $sdkVersion; + 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); + $map['game_id'] = ['in', $gameId]; } if (!empty($serverId)) { $map['tab_pay_info.server_id'] = $serverId;