推广平台-数据管理->角色查询|充值玩家|团队/推广员业绩--检索更新

master
chenxiaojun 5 years ago
commit 930a2dc62f

@ -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;
}

@ -26,25 +26,25 @@
<form action="{:U('Query/achievement',['row'=>I('get.row')])}" method="post" enctype="multipart/form-data">
<input type="hidden" name="parent_id" value="{:I('parent_id', 0)}">
<div class="form-group normal_space">
<select id="game-select" name="game_id" class="reselect select_gallery" style="width: 220px;" >
<select id="game-select" name="relation_game_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择游戏</option>
<volist name="games" id="game">
<option value="{$game.game_id}" <if condition="I('game_id') eq $game['game_id']">selected</if>>{$game.game_name}</option>
<option value="{$game.relation_game_id}" <if condition="I('relation_game_id') eq $game['relation_game_id']">selected</if>>{$game.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space">
<select id="server-select" name="server_id" class="reselect select_gallery" style="width: 220px;" data-server="{:I('server_id', 0)}" >
<option value="0">请选择区服</option>
</select>
</div>
<div class="form-group normal_space">
<select name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择设备类型</option>
<option value="1" <if condition="I('sdk_version') === '1'">selected</if>>Andriod</option>
<option value="2" <if condition="I('sdk_version') === '2'">selected</if>>IOS</option>
</select>
</div>
<div class="form-group normal_space">
<select id="server-select" name="server_id" class="reselect select_gallery" style="width: 220px;" data-server="{:I('server_id', 0)}" >
<option value="0">请选择区服</option>
</select>
</div>
<div class="form-group normal_space">
<select name="status" class="reselect select_gallery" style="width: 220px;" >
<option value="0">帐号状态</option>
@ -165,35 +165,37 @@ $(function() {
defaultDate: defaultDate,
})
$('.select_gallery').select2()
var gameId = $('#game-select').val();
var defaultServerId = $('#server-select').attr('data-server');
getGameServers(gameId, defaultServerId)
$('#game-select').on({
change: function name() {
gameId = $('#game-select').val()
getGameServers(gameId, 0)
}
})
function getGameServers(gameId, defaultServerId) {
$.ajax({
url: "{:U('Query/getGameServers')}",
dataType: 'json',
data: {game_id: gameId},
success: function(response) {
var options = '<option value="0">请选择区服</option>'
for (var i in response.data.servers) {
var server = response.data.servers[i]
var selected = ''
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
options += '<option value="' + server.server_id + '"' + selected + '>' + server.server_name + '</option>'
var gameId = $('#game-select').val();
var sdkVersion = $('#sdk_version').val();
var defaultServerId = $('#server-select').attr('data-server');
getGameServers(gameId, sdkVersion, defaultServerId)
$('#game-select,#sdk_version').on({
change: function name() {
gameId = $('#game-select').val();
sdkVersion = $('#sdk_version').val();
getGameServers(gameId, sdkVersion, 0);
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
}
})
}
});
function getGameServers(gameId, sdkVersion, defaultServerId) {
$.ajax({
url: "{:U('Query/getGameServers')}",
dataType: 'json',
data: {game_id: gameId, sdk_version: sdkVersion},
success: function(response) {
var options = '<option value="0">请选择区服</option>'
for (var i in response.data.servers) {
var server = response.data.servers[i]
var selected = ''
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
options += '<option value="' + server.server_id + '"' + selected + '>' + server.server_name + '</option>'
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
}
})
}
})
</script>
</block>

@ -35,25 +35,25 @@
<div class="trunk-content article">
<div class="trunk-search clearfix jssearch">
<div class="form-group normal_space">
<select id="game-select" name="game_id" class="reselect select_gallery" style="width: 220px;" >
<select id="game-select" name="relation_game_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择游戏</option>
<volist name="games" id="game">
<option value="{$game.game_id}" <if condition="I('game_id') === $game['game_id']">selected</if>>{$game.game_name}</option>
<option value="{$game.relation_game_id}" <if condition="I('relation_game_id') === $game['relation_game_id']">selected</if>>{$game.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space">
<select id="server-select" name="server_id" class="reselect select_gallery" style="width: 220px;" data-server="{:I('server_id', 0)}">
<option value="0">请选择区服</option>
</select>
</div>
<div class="form-group normal_space">
<select name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择设备类型</option>
<option value="1" <if condition="I('sdk_version') === '1'">selected</if>>Andriod</option>
<option value="2" <if condition="I('sdk_version') === '2'">selected</if>>IOS</option>
</select>
</div>
<div class="form-group normal_space">
<select id="server-select" name="server_id" class="reselect select_gallery" style="width: 220px;" data-server="{:I('server_id', 0)}">
<option value="0">请选择区服</option>
</select>
</div>
<include file="Public/promote_select" />
<div class="form-group normal_space">
<input type="text" name="role_name" class="txt normal_txt" placeholder="请输入角色名" value="{:I('role_name')}">
@ -224,19 +224,21 @@ $(function(){
});
var gameId = $('#game-select').val();
var sdkVersion = $('#sdk_version').val();
var defaultServerId = $('#server-select').attr('data-server');
getGameServers(gameId, defaultServerId)
$('#game-select').on({
getGameServers(gameId, sdkVersion, defaultServerId)
$('#game-select,#sdk_version').on({
change: function name() {
gameId = $('#game-select').val()
getGameServers(gameId, 0)
gameId = $('#game-select').val();
sdkVersion = $('#sdk_version').val();
getGameServers(gameId, sdkVersion, 0);
}
})
function getGameServers(gameId, defaultServerId) {
});
function getGameServers(gameId, sdkVersion, defaultServerId) {
$.ajax({
url: "{:U('Query/getGameServers')}",
dataType: 'json',
data: {game_id: gameId},
data: {game_id: gameId, sdk_version: sdkVersion},
success: function(response) {
var options = '<option value="0">请选择区服</option>'
for (var i in response.data.servers) {

@ -24,25 +24,25 @@
<div class="trunk-content article">
<div class="trunk-search clearfix jssearch">
<div class="form-group normal_space">
<select id="game-select" name="game_id" class="reselect select_gallery" style="width: 220px;" >
<select id="game-select" name="relation_game_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择游戏</option>
<volist name="games" id="game">
<option value="{$game.game_id}" <if condition="I('game_id') eq $game['game_id']">selected</if>>{$game.game_name}</option>
<option value="{$game.relation_game_id}" <if condition="I('relation_game_id') eq $game['relation_game_id']">selected</if>>{$game.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space">
<select id="server-select" name="server_id" class="reselect select_gallery" style="width: 220px;" data-server="{:I('server_id', 0)}">
<option value="0">请选择区服</option>
</select>
</div>
<div class="form-group normal_space">
<select name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择设备类型</option>
<option value="1" <if condition="I('sdk_version') === '1'">selected</if>>Andriod</option>
<option value="2" <if condition="I('sdk_version') === '2'">selected</if>>IOS</option>
</select>
</div>
<div class="form-group normal_space">
<select id="server-select" name="server_id" class="reselect select_gallery" style="width: 220px;" data-server="{:I('server_id', 0)}">
<option value="0">请选择区服</option>
</select>
</div>
<include file="Public/promote_select" />
<div class="form-group normal_space">
<input type="text" name="role_name" class="txt normal_txt" id="uid" placeholder="请输入角色名" value="{:I('role_name')}">
@ -140,35 +140,37 @@ $(function() {
defaultDate: defaultDate,
})
$('.select_gallery').select2()
var gameId = $('#game-select').val();
var defaultServerId = $('#server-select').attr('data-server');
getGameServers(gameId, defaultServerId)
$('#game-select').on({
change: function name() {
gameId = $('#game-select').val()
getGameServers(gameId, 0)
}
})
function getGameServers(gameId, defaultServerId) {
$.ajax({
url: "{:U('Query/getGameServers')}",
dataType: 'json',
data: {game_id: gameId},
success: function(response) {
var options = '<option value="0">请选择区服</option>'
for (var i in response.data.servers) {
var server = response.data.servers[i]
var selected = ''
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
options += '<option value="' + server.server_id + '"' + selected + '>' + server.server_name + '</option>'
var gameId = $('#game-select').val();
var sdkVersion = $('#sdk_version').val();
var defaultServerId = $('#server-select').attr('data-server');
getGameServers(gameId, sdkVersion, defaultServerId)
$('#game-select,#sdk_version').on({
change: function name() {
gameId = $('#game-select').val();
sdkVersion = $('#sdk_version').val();
getGameServers(gameId, sdkVersion, 0);
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
}
})
}
});
function getGameServers(gameId, sdkVersion, defaultServerId) {
$.ajax({
url: "{:U('Query/getGameServers')}",
dataType: 'json',
data: {game_id: gameId, sdk_version: sdkVersion},
success: function(response) {
var options = '<option value="0">请选择区服</option>'
for (var i in response.data.servers) {
var server = response.data.servers[i]
var selected = ''
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
options += '<option value="' + server.server_id + '"' + selected + '>' + server.server_name + '</option>'
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
}
})
}
var promoteUrl = "{:U('Query/getSubPromotes')}"
initPromoteSelect(promoteUrl)

Loading…
Cancel
Save