|
|
|
@ -1603,7 +1603,7 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
public function userRoles()
|
|
|
|
|
{
|
|
|
|
|
$gameId = I('game_id', 0);
|
|
|
|
|
$relationGameId = I('relation_game_id', 0);
|
|
|
|
|
$serverId = I('server_id', 0);
|
|
|
|
|
$isSelf = I('is_self', 0);
|
|
|
|
|
$roleName = I('role_name', '');
|
|
|
|
@ -1633,8 +1633,13 @@ class QueryController extends BaseController
|
|
|
|
|
$map['_string'] = '1<>1';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($gameId != 0) {
|
|
|
|
|
$map['game_id'] = $gameId;
|
|
|
|
|
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 ($serverId != 0) {
|
|
|
|
|
$map['server_id'] = $serverId;
|
|
|
|
@ -1645,9 +1650,6 @@ class QueryController extends BaseController
|
|
|
|
|
if ($userAccount != '') {
|
|
|
|
|
$map['user_account'] = ['like', '%' . $userAccount . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($sdkVersion != 0) {
|
|
|
|
|
$map['sdk_version'] = $sdkVersion;
|
|
|
|
|
}
|
|
|
|
|
if ($roleLevelBegin != 0 && $roleLevelEnd == 0) {
|
|
|
|
|
$map['role_level'] = ['egt', $roleLevelBegin];
|
|
|
|
|
} elseif ($roleLevelEnd != 0 && $roleLevelBegin == 0) {
|
|
|
|
@ -1693,7 +1695,7 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$games = $this->getGamesByPromote($promote);
|
|
|
|
|
$games = get_promote_serach_game();
|
|
|
|
|
|
|
|
|
|
$this->assign('games', $games);
|
|
|
|
|
$this->assign('records', $records);
|
|
|
|
@ -1704,7 +1706,7 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
public function userRecharges()
|
|
|
|
|
{
|
|
|
|
|
$gameId = I('game_id', 0);
|
|
|
|
|
$relationGameId = I('relation_game_id', 0);
|
|
|
|
|
$serverId = I('server_id', 0);
|
|
|
|
|
$isSelf = I('is_self', 0);
|
|
|
|
|
$roleName = I('role_name', '');
|
|
|
|
@ -1748,9 +1750,14 @@ class QueryController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$subMap = [];
|
|
|
|
|
if ($gameId != 0) {
|
|
|
|
|
$map['game_id'] = $gameId;
|
|
|
|
|
$subMap['game_id'] = $gameId;
|
|
|
|
|
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];
|
|
|
|
|
$subMap['game_id'] = ['in', $gameId];
|
|
|
|
|
}
|
|
|
|
|
if ($serverId != 0) {
|
|
|
|
|
$map['server_id'] = $serverId;
|
|
|
|
@ -1762,9 +1769,6 @@ class QueryController extends BaseController
|
|
|
|
|
if ($userAccount != '') {
|
|
|
|
|
$map['user_account'] = ['like', '%' . $userAccount . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($sdkVersion != 0) {
|
|
|
|
|
$map['sdk_version'] = $sdkVersion;
|
|
|
|
|
}
|
|
|
|
|
if ($isSelf) {
|
|
|
|
|
$map['promote_id'] = $queryPromote['id'];
|
|
|
|
|
}
|
|
|
|
@ -1865,7 +1869,7 @@ class QueryController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$games = $this->getGamesByPromote($promote);
|
|
|
|
|
$games = get_promote_serach_game();
|
|
|
|
|
|
|
|
|
|
$this->assign('games', $games);
|
|
|
|
|
$this->assign('records', $records);
|
|
|
|
@ -1894,7 +1898,16 @@ class QueryController extends BaseController
|
|
|
|
|
public function getGameServers()
|
|
|
|
|
{
|
|
|
|
|
$gameId = I('game_id', 0);
|
|
|
|
|
$servers = M('server', 'tab_')->field(['id', 'server_id', 'server_name'])->where(['game_id' => $gameId])->order('server_id asc')->select();
|
|
|
|
|
$sdkVersion = I('sdk_version', 0);
|
|
|
|
|
$servers = [];
|
|
|
|
|
if (!empty($gameId)) {
|
|
|
|
|
$map['relation_game_id'] = $gameId;
|
|
|
|
|
if (in_array($sdkVersion, [1, 2])) {
|
|
|
|
|
$map['sdk_version'] = $sdkVersion;
|
|
|
|
|
}
|
|
|
|
|
$gameIds = M('game', 'tab_')->where($map)->getField('id', true);
|
|
|
|
|
$servers = M('server', 'tab_')->field(['id', 'server_id', 'server_name'])->where(['game_id' => ['in', $gameIds]])->order('server_id asc')->select();
|
|
|
|
|
}
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|
'status' => 1,
|
|
|
|
|
'msg' => '成功',
|
|
|
|
@ -1965,7 +1978,7 @@ class QueryController extends BaseController
|
|
|
|
|
$defaultTime = date('Y-m-d', time());
|
|
|
|
|
}
|
|
|
|
|
$sdkVersion = I('sdk_version', 0);
|
|
|
|
|
$gameId = I('game_id', 0);
|
|
|
|
|
$relationGameId = I('relation_game_id', 0);
|
|
|
|
|
$serverId = I('server_id', 0);
|
|
|
|
|
$parentId = I('parent_id', 0);
|
|
|
|
|
$promoteId = I('promote_id', 0);
|
|
|
|
@ -1990,7 +2003,7 @@ class QueryController extends BaseController
|
|
|
|
|
$searchLevel = $parent['level'] + 1;
|
|
|
|
|
$searchLevelName = $promoteService->getLevelName($searchLevel);
|
|
|
|
|
|
|
|
|
|
$games = $this->getGamesByPromote($parent);
|
|
|
|
|
$games = get_promote_serach_game();
|
|
|
|
|
|
|
|
|
|
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $parent['id']])->select();
|
|
|
|
|
|
|
|
|
@ -2024,15 +2037,17 @@ class QueryController extends BaseController
|
|
|
|
|
'isContainSubs' => true,
|
|
|
|
|
'basicPromotes' => $basicPromotes,
|
|
|
|
|
];
|
|
|
|
|
if ($gameId > 0) {
|
|
|
|
|
$params['game_id'] = $gameId;
|
|
|
|
|
if ($relationGameId > 0) {
|
|
|
|
|
$gameMap['relation_game_id'] = $relationGameId;
|
|
|
|
|
if ($sdkVersion > 0) {
|
|
|
|
|
$gameMap['sdk_version'] = $sdkVersion;
|
|
|
|
|
}
|
|
|
|
|
$gameId = M('game', 'tab_')->where($gameMap)->getField('id', true);
|
|
|
|
|
$params['game_id'] = ['in', $gameId];
|
|
|
|
|
}
|
|
|
|
|
if ($serverId > 0) {
|
|
|
|
|
$params['server_id'] = $serverId;
|
|
|
|
|
}
|
|
|
|
|
if ($sdkVersion > 0) {
|
|
|
|
|
$params['sdk_version'] = $sdkVersion;
|
|
|
|
|
}
|
|
|
|
|
if ($status > 0) {
|
|
|
|
|
$params['lock_status'] = $status;
|
|
|
|
|
}
|
|
|
|
|