master
jbrazz 5 years ago
parent 8be3ee9560
commit 8a513767dd

@ -550,9 +550,10 @@ function getGameByName($game_name=null, $sdk_version=null)
$map['relation_game_name'] = $game_name;
}
if ($sdk_version) {
$map['server_version'] = $sdk_version;
$map['sdk_version'] = $sdk_version;
}
return D("Game")->where($map)->select();
$result = D("Game")->where($map)->select();
return $result;
}
function getTopPromote($promote_id)

@ -52,7 +52,7 @@ class ExportController extends Controller
array('play_ip', "最后登录ip"),
);
if (isset($_REQUEST['game_name'])) {
$map['game_name'] = trim($_REQUEST['game_name']);
$map['game_name'] = ['like', trim($_REQUEST['game_name'])."%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['user_account'])) {
@ -600,13 +600,17 @@ class ExportController extends Controller
unset($_REQUEST['end']);
}
if(isset($_REQUEST['game_name'])){
if ($_REQUEST['game_name'] == L('All')) {
if($_REQUEST['game_name']=='全部'){
unset($_REQUEST['game_name']);
}else{
$map['game_name'] = $_REQUEST['game_name'];
$map['tab_spend.game_id']= ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')];
unset($_REQUEST['game_name']);
}
}
if(isset($_REQUEST['server_name'])){
$map['tab_spend.server_name']=$_REQUEST['server_name'];
unset($_REQUEST['server_name']);
}
if (isset($_REQUEST['pay_order_number'])) {
$map['pay_order_number'] = array('like', '%' . trim($_REQUEST['pay_order_number']) . '%');
unset($_REQUEST['pay_order_number']);
@ -623,6 +627,17 @@ class ExportController extends Controller
$map['pay_game_status'] = $_REQUEST['pay_game_status'];
unset($_REQUEST['pay_game_status']);
}
if(isset($_REQUEST['promote_id'])) {
if ($_REQUEST['promote_id'] == 0) {
$map['promote_id'] = 0;
} else {
$map['_complex'] = ['tp.chain'=>['like', "%/{$_REQUEST['promote_id']}/%"], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or'];
}
$tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id";
//unset($_REQUEST['promote_id']);
} else {
$tab_promote_join = false;
}
$map1 = $map;
$map1['pay_status'] = 1;
$total = D('Spend')->where($map1)->sum('pay_amount');
@ -634,6 +649,7 @@ class ExportController extends Controller
$xlsData = D('Spend')
->field('pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,pay_amount,pay_amount,pay_status,pay_game_status,pay_way,server_name,game_player_name,cost')
->where($map)
->join($tab_promote_join)
->order('pay_time DESC')
->select();
$xlsCell = array(
@ -3801,7 +3817,7 @@ if ($key == 'model'){
$model = M('game','tab_');
if(isset($_REQUEST['game_name'])){
$map['game_name'] = $_REQUEST['game_name'];
$extend['game_name'] = ['like', "{$_REQUEST['game_name']}%"];
}
if(isset($_REQUEST['sdk_version1'])){
$map['sdk_version']=$_REQUEST['sdk_version1'];
@ -4185,8 +4201,10 @@ if ($key == 'model'){
if(isset($_REQUEST['game_name'])){
if($_REQUEST['game_name']=='全部'){
unset($_REQUEST['game_name']);
}else{
$map['game_name']=$_REQUEST['game_name'];
$extend['game_name']=['like', "{$_REQUEST['game_name']}%"];
unset($_REQUEST['game_name']);
}
}
@ -5393,8 +5411,9 @@ if ($key == 'model'){
$map['promote_account'] = array('like','%'.I("root_name").'%');
}
if (!empty(I("game_id"))) {
$map['game_id'] = I("game_id");
$game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id');
if ($game_ids) {
$map['game_id'] = ['in', $game_ids];
}
if (!empty(I('partner_id'))) {

@ -139,9 +139,9 @@ class FinanceController extends ThinkController
if (!empty(I('root_name'))) {
$map['promote_account'] = array('like','%'.I("root_name").'%');
}
if (!empty(I("game_id"))) {
$map['game_id'] = I("game_id");
$game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id');
if ($game_ids) {
$map['game_id'] = ['in', $game_ids];
}
if(!empty(I('root_id'))||I('root_id')=='0') {
@ -614,7 +614,10 @@ class FinanceController extends ThinkController
if (I('partner_id')) {
$map['partner_id'] = I('partner_id');
}
$data = M('game','tab_')->field("id,game_name")->where($map)->select();
if (I('sdk_type')) {
$map['sdk_version'] = I('sdk_type');
}
$data = M('game','tab_')->field("relation_game_name as game_name")->where($map)->group("relation_game_name")->select();
$this->ajaxReturn($data,'json');
}

@ -33,7 +33,7 @@ class GameController extends ThinkController
public function lists()
{
if (isset($_REQUEST['game_name'])) {
$extend['game_name'] = $_REQUEST['game_name'];
$extend['game_name'] = ['like', "{$_REQUEST['game_name']}%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['sdk_version1'])) {

@ -35,13 +35,10 @@ class ProvideController extends ThinkController {
$map['create_time'] = ['LT',strtotime(I('end'))+86399];
unset($_REQUEST['end']);
}
if(isset($_REQUEST['game_name'])){
if($_REQUEST['game_name']=='请选择'){
unset($_REQUEST['game_name']);
}else{
$map['game_name']=$_REQUEST['game_name'];
unset($_REQUEST['game_name']);
}
$game_ids = array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['sdk_version1']), 'id');
if ($game_ids) {
$map['game_id'] = ['in', $game_ids];
unset($_REQUEST['game_name'], $_REQUEST['sdk_version1']);
}
if(isset($_REQUEST['op_account'])){
if($_REQUEST['op_account']=='请选择'){

@ -31,9 +31,9 @@ class RechargeSumController extends ThinkController{
if(isset($_REQUEST['promote_id'])){
if ($_REQUEST['promote_id'] > 0) {
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
$promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
$promoter_ids ? $rmap['tab_user.promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
} else {
$rmap['promote_id'] = $map['promote_id'] = 0;
$rmap['tab_user.promote_id'] = $map['promote_id'] = 0;
}
}

@ -35,7 +35,7 @@ class ServerController extends ThinkController {
if($_REQUEST['game_name']=='全部'){
unset($_REQUEST['game_name']);
}else{
$extend['game_name']=$_REQUEST['game_name'];
$extend['game_name']=['like', "{$_REQUEST['game_name']}%"];
unset($_REQUEST['game_name']);
}
}

@ -558,7 +558,7 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
{
$map = [];
if (isset($_REQUEST['game_name'])) {
$map['game_name'] = trim($_REQUEST['game_name']);
$map['game_name'] = ['like', trim($_REQUEST['game_name'])."%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['server_id'])) {

@ -89,11 +89,18 @@
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_id" class="select_gallery" style="width:120px;">
<option value="">请选择游戏</option>
<volist name=":getGameList($_GET['partner_id'])" id="vo">
<option value="{$vo.id}" <if condition="$vo.id eq $_GET['game_id']">selected=selected</if>>{$vo.game_name}</option>
</volist>
<select id="sdk_type" name="sdk_type" class="select_gallery" >
<option value="">设备类型</option>
<option value="1">安卓</option>
<option value="2">苹果</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> -->
</select>
</div>
<input type="hidden" name="count_date" value="{$_GET['count_date']}"/>
@ -259,45 +266,32 @@
});
});
$("#partner_id").change(function(){
function get_game_list()
{
var game_name = "{:I('game_name')}";
$.ajax({
url:"{:U('Finance/getGameList')}",
type:"post",
data:{partner_id:$("#partner_id option:selected").attr('partner-id')},
data:{partner_id:$("#partner_id option:selected").attr('partner-id'), sdk_type:$("#sdk_version1 option:selected").val()},
dataType:'json',
success:function(data){
var str = "<option value=''>请选择游戏</option>";
for (var i in data){
str += "<option value='"+data[i].id+"'>"+data[i].game_name+"</option>"
str += "<option value='"+data[i].game_name+"'"+(game_name && data[i].game_name == game_name?'selected':'')+">"+data[i].game_name+"</option>"
}
// console.log(str);
$("#game_id").empty();
$("#game_id").append(str);
$("#game_name").empty();
$("#game_name").append(str);
// $("#server_id").select2();
}
})
});
var game_id = "{:I('game_name')}";
var game_server = "{:I('server_id')}";
if(game_id){
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
type:"post",
data:{game_id:game_id,type:2},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
$("#partner_id, #sdk_type").change(function(){
get_game_list();
});
}
})
}
$("#partner_id").change();
})
</script>
</block>

@ -69,7 +69,7 @@ text-indent:0;
<label>搜索:</label>
</div>
<!--游戏类型搜索END-->
<div class="input-list input-list-game search_label_rehab">
<!-- <div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" style="width:120px;">
<option value="">游戏名称</option>
<volist name=":get_game_list(I('type',1))" id="vo">
@ -84,6 +84,21 @@ text-indent:0;
<option value="2">苹果</option>
<input type="hidden" id="sdk_version" name="sdk_version" value="{:I('sdk_version')}">
</select>
</div> -->
<div class="input-list input-list-game search_label_rehab">
<select id="sdk_version1" name="sdk_version1" class="select_gallery" >
<option value="">设备类型</option>
<option value="1">安卓</option>
<option value="2">苹果</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> -->
</select>
</div>
<div class="input-list input-list-platform">
<select id="server_type" name="server_type" >
@ -578,6 +593,32 @@ $(function(){
})
});
});*/
var game_name = "{:I('game_name')}";
$("#sdk_version1").change(function(){
$.ajax({
url:"{:U('Ajax/getGameList')}",
type:"get",
data:{sdk_type:$("#sdk_version1 option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">游戏名称</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
// });
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_name+"' "+(game_name && data[i].relation_game_name == game_name?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#game_name").empty();
$("#game_name").append(str);
$("#game_name").select2();
$("#game_name").change();
}
})
});
$("#sdk_version1").change();
})
</script>
</block>

@ -93,10 +93,10 @@
<div class="input-list input-list-channelstatus">
<select name="promote_level">
<option value="">推广员等级</option>
<option value="1">一级推广员</option>
<option value="2">二级推广员</option>
<option value="3">三级推广员</option>
<option value="4">四级级推广</option>
<option value="1">会长</option>
<option value="2">部门长</option>
<option value="3">组长</option>
<option value="4"></option>
</select>
</div>
<div class="input-list input-list-admin search_label_rehab">
@ -157,7 +157,7 @@
<th ><a class="paixu" data-order='create_time'>注册时间</a></th>
<th ><a class="paixu" data-order='last_login_time'>最后登录时间</a></th>
<th>渠道类型</th>
<th>上线会长</th>
<th>所属会长</th>
<th>商务专员</th>
<th>状态</th>
<th>可申请游戏</th>

@ -52,11 +52,18 @@
value="{:I('user_account')}">
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" style="width:120px;">
<select id="sdk_version1" name="sdk_version1" class="select_gallery" >
<option value="">设备类型</option>
<option value="1">安卓</option>
<option value="2">苹果</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.game_name}">{$vo.game_name}</option>
</volist>
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> -->
</select>
</div>
<div class="input-list">
@ -334,5 +341,31 @@
});
})
var game_name = "{:I('game_name')}";
$("#sdk_version1").change(function(){
$.ajax({
url:"{:U('Ajax/getGameList')}",
type:"get",
data:{sdk_type:$("#sdk_version1 option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">游戏名称</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
// });
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_name+"' "+(game_name && data[i].relation_game_name == game_name?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#game_name").empty();
$("#game_name").append(str);
$("#game_name").select2();
$("#game_name").change();
}
})
});
$("#sdk_version1").change();
</script>
</block>

@ -71,11 +71,18 @@
</div>
</notempty>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" >
<select id="server_version" name="server_version" class="select_gallery" >
<option value="">设备类型</option>
<option value="1">安卓</option>
<option value="2">苹果</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.game_name}">{$vo.game_name}</option>
</volist>
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> -->
</select>
</div>
<div class="input-list" >
@ -85,14 +92,6 @@
<input type="text" id="time-end" name="timeend" class="" value="{:I('timeend')}" placeholder="开服结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list search_item input-list-platform">
<select name="server_version">
<option value="">运营平台</option>
<volist name=":get_systems_list()" id="vo">
<option value="{$key}">{$vo}</option>
</volist>
</select>
</div>
<div class="input-list search_item input-list-displaystatus">
<select name="show_status">
@ -301,6 +300,32 @@ $(function(){
pickerPosition:'bottom-left'
});
var game_name = "{:I('game_name')}";
$("#server_version").change(function(){
$.ajax({
url:"{:U('Ajax/getGameList')}",
type:"get",
data:{sdk_type:$("#server_version option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">游戏名称</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
// });
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_name+"' "+(game_name && data[i].relation_game_name == game_name?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#game_name").empty();
$("#game_name").append(str);
$("#game_name").select2();
$("#game_name").change();
}
})
});
$("#server_version").change();
})
</script>

@ -59,17 +59,23 @@
<input type="text" name="role_name" class="" value="{:I('role_name')}" placeholder="角色名称">&nbsp;&nbsp;&nbsp;
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" >
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">设备类型</option>
<option value="1">安卓</option>
<option value="2">苹果</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.game_name}">{$vo.game_name}</option>
</volist>
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> -->
</select>
</div>
<div class="input-list">
<select id="server_id" name="server_id" class="select_gallery" >
<option value="">游戏区服</option>
<div class="input-list input-list-server search_label_rehab">
<select id="server_id" name="server_id" class="select_gallery" style="width:120px;">
<option value="">区服名称</option>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
@ -270,5 +276,49 @@ $(".select_gallery").select2();
})
});
$("#promote_level").change();
var game_name = "{:I('game_name')}";
$("#game_type").change(function(){
$.ajax({
url:"{:U('Ajax/getGameList')}",
type:"get",
data:{sdk_type:$("#game_type option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">游戏名称</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
// });
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_name+"' "+(game_name && data[i].relation_game_name == game_name?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#game_name").empty();
$("#game_name").append(str);
$("#game_name").select2();
$("#game_name").change();
}
})
});
$("#game_type").change();
var game_server = "{:I('server_id')}";
$("#game_name").change(function(){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_id+"' "+(game_server && data[i].server_id == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});
</script>
</block>

Loading…
Cancel
Save