公会统计5

master
chenzhi 5 years ago
parent 1450d05677
commit 9104c0865c

@ -541,5 +541,110 @@ class FinancePromoteController extends AdminController
->find(); ->find();
return $data; return $data;
} }
//游戏弹框详情
public function gameCoinDetail($p = 1) {
set_time_limit(0);
if (isset($_REQUEST['pay_way'])) {
$map['pay_way'] = $_REQUEST['pay_way'];
$this->assign('pay_way', $map['pay_way']);
}
if (!empty($_REQUEST['pay_order_number'])) {
$map['pay_order_number'] = $_REQUEST['pay_order_number'];
}
if (!empty(I('partner_id'))&&empty(I("game_id"))) {
$wherePartner = I('partner_id');
$gameId = M("game","tab_")->field("id")->where("partner_id={$wherePartner}")->select();
$gameId = implode(',',array_column($gameId,'id'));
$map['tab_spend.game_id'] = ['in',$gameId];
}
if (!empty(I('timestart'))) {
$timestart = strtotime(I('timestart'));
$map['_string'] = "pay_time > {$timestart}";
}
if (!empty(I('timeend'))) {
$timeend = strtotime(I('timeend'));
$map['_string'] .= " and pay_time < {$timeend}";
}
if (!empty(I("promote_id"))) {
$promote_id[] = I("promote_id");
}
if (!empty(I("root_id"))) {
$root_id = I("root_id");
$promote_id = $this->getPromoteList($root_id);
array_push($promote_id, $root_id);
}
if ($_REQUEST['root_id']=='0') {
$map['tab_spend.promote_id'] = $_REQUEST['root_id'];
}
$promote_id = implode(',',$promote_id);
if ($promote_id) {
$map['tab_spend.promote_id'] = ['in',$promote_id];
}
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$map['pay_status'] = 1;
if (!empty(I("game_id"))) {
$map['tab_spend.game_id'] = I("game_id");
}
if (!empty(I('user_account'))) {
$map['tab_spend.user_account'] = array('like','%'.I("user_account").'%');
}
if (!empty(I('user_nickname'))) {
$map['tab_spend.game_player_name'] = array('like',I("user_nickname").'%');
}
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,tab_spend.user_account,
tab_spend.user_nickname,tab_spend.game_name,tab_spend.promote_account,spend_ip,tab_spend.server_name,
game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
$join = false;
if ($map['pay_way'] ==-1) {//绑定币
$field2 = $field . ',bind_balance';
$join = 'left join tab_user_play as p on p.user_id = tab_spend.user_id and tab_spend.game_id=p.game_id';
} elseif ($map['pay_way'] ==0) {//平台币
$field2 = $field . ',balance';
$join = 'left join tab_user as u on u.id = tab_spend.user_id';
}
$data = D('spend')->getSpendData($map, $field2, $group, $order, $page, $row, $join);
foreach($data as $key => $value) {
$data[$key]['pay_way'] = getPayType($value['pay_way']);
}
$count = D("spend")->getSpendData($map,$field,$group,$order);
$count = count($count);
$page = set_pagination($count,$row);
// $map['pay_game_status'] = 1;
$total_cost = D('spend')->sumSpend($map, 'cost');//订单金额合计
$total_pay_amount = D('spend')->sumSpend($map, 'pay_amount');//实付金额合计
$this->assign('total_cost', $total_cost);
$this->assign('total_pay_amount', $total_pay_amount);
if($page) {$this->assign('_page', $page);}
$this->meta_title = '游戏订单查看';
$this->assign('data',$data);
$this->display();
}
} }

@ -0,0 +1,146 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>游戏登陆列表|----软件管理平台</title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
</head>
<style>
body {
padding: 0px;
}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;width: 90%;">
<!-- 标题栏 -->
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<!--游戏类型搜索END-->
<input type="hidden" name="game_id" value="{$_GET['game_id']}"/>
<input type="hidden" name="game_name" value="{$_GET['game_name']}"/>
<div class="input-list">
<input type="text" name="pay_order_number" placeholder="请输入支付订单号" class="" value="{:I('pay_order_number')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<input type="text" name="user_account" placeholder="请输入玩家账号" class="" value="{:I('user_account')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<input type="text" name="user_nickname" placeholder="请输入角色名称" class="" value="{:I('user_nickname')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/coinDetail','model='.$model['name'].'&row='.I('row'),false)}"
style="">搜索</a>
<if condition="$_GET['all'] neq 1">
<a class="sch-btn" href="{:U('Export/coinDetail',
array(
'game_id'=>$_GET['game_id'],
'game_name'=>$_GET['game_name'],
'pay_way'=>$_GET['pay_way'],
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'user_account'=>$_GET['user_account'],
'pay_order_number'=>$_GET['pay_order_number'],
false))}">导出</a>
</if>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list box_mt">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th >支付订单号</th>
<th>充值时间</th>
<th >玩家账号</th>
<th >游戏名称</th>
<th >游戏区服</th>
<th >角色名称</th>
<th >订单金额</th>
<th >实付金额</th>
<th >充值方式</th>
<th ><if condition="$pay_way eq -1">绑定币余额<else/>平台币余额</if></th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<volist name="data" id="data">
<tr>
<td >{$data.pay_order_number}</td>
<td >{$data.pay_time}</td>
<td >{$data.user_account}</td>
<td >{$data.game_name}</td>
<td >{$data.server_name}</td>
<td >{$data.game_player_name}</td>
<td >{$data.cost}</td>
<td >{$data.pay_amount}</td>
<td >{$data.pay_way}</td>
<if condition="$pay_way eq -1">
<td >{$data.bind_balance}</td>
<else/>
<td >{$data.balance}</td>
</if>
</tr>
</volist>
<tr>
<td colspan="6" ><span>总计</span></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0</if></td>
<td colspan="2"> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page}
</div>

</div>
<script>
$(function(){
//搜索功能
$("#search").click(function(){
console.log(222);
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if ( url.indexOf('?')>0 ){
url += '&' + query;
} else {
url += '?' + query;
}
window.parent.reloadIframe(url);
parent.document.getElementsByTagName('iframe').src = url;
console.log(url);
});
});
</script>
</body>
</html>

@ -190,25 +190,10 @@
<td ><if condition="$data.game_name neq ''">{$data.game_name}<else/></if></td> <td ><if condition="$data.game_name neq ''">{$data.game_name}<else/></if></td>
<td ><if condition="$data.cash_count neq ''">{$data.cash_count}<else/>0</if></td> <td ><if condition="$data.cash_count neq ''">{$data.cash_count}<else/>0</if></td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" <td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer"
data-url="{:U('Finance/coinDetail',array( data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'game_id'=>$data['game_id'],p=>1,row=>10]))}">
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'sdk_type'=>$_GET['sdk_type'],
'game_id'=>$data['game_id'],
'game_name'=>$data['game_name'],
'partner_id'=>$_REQUEST['partner_id'],
'pay_way'=>0,
false))}">
<if condition="$data.balance_coin_count neq ''">{$data.balance_coin_count}<else/>0</if></td> <if condition="$data.balance_coin_count neq ''">{$data.balance_coin_count}<else/>0</if></td>
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('Finance/coinDetail',array( <td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'game_id'=>$data['game_id'],p=>1,row=>10]))}">
'timestart'=>$_GET['timestart'], <if condition="$data.inside_cash_count neq ''">{$data.inside_cash_count}<else/>0</if></td>
'timeend'=>$_GET['timeend'],
'sdk_type'=>$_GET['sdk_type'],
'game_id'=>$data['game_id'],
'game_name'=>$data['game_name'],
'partner_id'=>$_REQUEST['partner_id'],
'pay_way'=>-1,
false))}"><if condition="$data.inside_cash_count neq ''">{$data.inside_cash_count}<else/>0</if></td>
<td ><if condition="$data.all_cash_count neq ''">{$data.all_cash_count}<else/>0</if></td> <td ><if condition="$data.all_cash_count neq ''">{$data.all_cash_count}<else/>0</if></td>
<td > <td >
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['game_id'=>$data['game_id'],'game_name'=>$data['game_name'],'promote_level'=>$promote_level]))}" >订单查看</a> <a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['game_id'=>$data['game_id'],'game_name'=>$data['game_name'],'promote_level'=>$promote_level]))}" >订单查看</a>
@ -309,19 +294,19 @@
$("#search").click(); $("#search").click();
} }
}); });
$(".ljcz").click(function(){ // $(".ljcz").click(function(){
var id = $(this).attr('data-value'); // var id = $(this).attr('data-value');
var game_name = "{:I('game_name')}"; // var game_name = "{:I('game_name')}";
var server_name = "{:I('server_id')}"; // var server_name = "{:I('server_id')}";
layer.open({ // layer.open({
type: 2, // type: 2,
title: '游戏消费记录', // title: '游戏消费记录',
shadeClose: true, // shadeClose: true,
shade: 0.8, // shade: 0.8,
area: ['70%', '80%'], // area: ['70%', '80%'],
content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url // content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url
}); // });
}); // });
function get_game_list() function get_game_list()
{ {

Loading…
Cancel
Save