推广平台>数据管理>充值玩家--更新

master
chenxiaojun 5 years ago
commit a29f6bfc14

@ -1198,3 +1198,18 @@ function getChildGameAddPermission($promoteId)
{
return D('Promote')->where(array('id' => $promoteId))->getField('child_game_permission');
}
function gameSearch($relationGameId, $sdkVersion)
{
$map = '1 = 1';
if ($relationGameId != 0) {
$map['relation_game_id'] = $relationGameId;
}
if ($sdkVersion != 0) {
$map['sdk_version'] = $sdkVersion;
}
$gameIds = M('game', 'tab_')->where($map)->getField('id', true);
$gameIds = $gameIds ?? [-1];
return $gameIds;
}

@ -1678,16 +1678,8 @@ class QueryController extends BaseController
}
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);
$gameId = $gameId ?? [];
$map['game_id'] = ['in', $gameId];
$gameIds = gameSearch($relationGameId, $sdkVersion);
$map['game_id'] = ['in', $gameIds];
}
if ($serverId != 0) {
$map['server_id'] = $serverId;
@ -1793,17 +1785,9 @@ class QueryController extends BaseController
$subMap = ['promote_id' => ['in', $ids]];
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);
$gameId = $gameId ?? [];
$map['uc.game_id'] = ['in', $gameId];
$subMap['game_id'] = ['in', $gameId];
$gameIds = gameSearch($relationGameId, $sdkVersion);
$map['uc.game_id'] = ['in', $gameIds];
$subMap['game_id'] = ['in', $gameIds];
}
if ($serverId != 0) {
$map['uc.server_id'] = $serverId;
@ -2081,16 +2065,8 @@ class QueryController extends BaseController
'basicPromotes' => $basicPromotes,
];
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);
$gameId = $gameId ?? [];
$params['game_id'] = ['in', $gameId];
$gameIds = gameSearch($relationGameId, $sdkVersion);
$params['game_id'] = ['in', $gameIds];
}
if ($serverId > 0) {
$params['server_id'] = $serverId;

Loading…
Cancel
Save