diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 8f93aab6c..034046398 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -6489,9 +6489,9 @@ if ($key == 'model'){ $map['_string'] .= " and s.pay_time < {$timeend}"; } - $data = D("spend")->gameStatistics($map); - foreach ($data as $key => $value) { - $data[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count']; + $xlsData = D("spend")->gameStatistics($map); + foreach ($xlsData as $key => $value) { + $xlsData[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count']; } $totalData = D("spend")->totalGameStatistics($map); diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 6efe2a91a..ad2411cd3 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -738,6 +738,89 @@ class FinanceController extends ThinkController $this->assign('sumAll', $sumAll); $this->assign('data',$data); + $this->display(); + } + + public function gameStatisticsDetail($p = 1) { + set_time_limit(0); + 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['promote_id'] = $_REQUEST['root_id']; + } + + if (!empty(I("parent_id"))) { + $parent_id = I("parent_id"); + $promote_id = $this->getPromoteList($parent_id); + array_push($promote_id,$parent_id); + } + + $promote_id = implode(',',$promote_id); + if ($promote_id) { + $map['promote_id'] = ['in',$promote_id]; + } + + 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['game_id'] = ['in',$gameId]; + } +// var_dump($map);die(); + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + if (!empty(I("count_date"))) { + $month = I("count_date"); + $tarry = explode('-',$month); + $startTime=mktime(0,0,0,$tarry[1],1,$tarry[0]); + $endTime =mktime(0,0,0,$tarry[1]-0+1,1,$tarry[0])-1; + $map['pay_time'] = array('between',array($startTime,$endTime)); + } + + $map['pay_status'] = 1; + if (!empty(I("game_id"))) { + $map['game_id'] = I("game_id"); + } + if (!empty(I('user_account'))) { + $map['user_account'] = array('like','%'.I("user_account").'%'); + } + if (!empty(I('user_nickname'))) { + $map['game_player_name'] = array('like',I("user_nickname").'%'); + } +// var_dump($map);die(); + $field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way"; + $group = ""; + $order = "pay_time DESC"; + $data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row); +// echo D("spend")->_sql();die(); + + foreach($data as $key => $value) { + $data[$key]['pay_way'] = getPayType($value['pay_way']); + } + + $sum = D('spend')->sumSpend($map,'pay_amount'); + + $count = D("spend")->getSpendData($map,$field,$group,$order); + + $count = count($count); + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + $this->meta_title = '游戏充值流水'; + + $this->assign('data',$data); + $this->assign('sum_amount',$sum); + $this->display(); } diff --git a/Application/Admin/View/Finance/gameStatistics.html b/Application/Admin/View/Finance/gameStatistics.html index d8ce722db..5c3af308e 100644 --- a/Application/Admin/View/Finance/gameStatistics.html +++ b/Application/Admin/View/Finance/gameStatistics.html @@ -115,19 +115,20 @@ - - - - -
搜索 $_GET['timestart'], + 'timeend'=>$_GET['timeend'], + 'sdk_type'=>$_GET['sdk_type'], + 'game_name'=>$_GET['game_name'], + 'game_id'=>$_REQUEST['game_id'], + 'partner_id'=>$_REQUEST['partner_id'], + false))}" style="width: 100px;border: #3C95C8 solid 1px;">导出
@@ -181,10 +182,14 @@ {$data.inside_cash_count}0 {$data.all_cash_count}0 - 查看 + 查看 @@ -195,10 +200,15 @@ {$sumInside}0 {$sumAll}0 - 查看 + 查看 diff --git a/Application/Admin/View/Finance/gameStatisticsDetail.html b/Application/Admin/View/Finance/gameStatisticsDetail.html new file mode 100644 index 000000000..72c538978 --- /dev/null +++ b/Application/Admin/View/Finance/gameStatisticsDetail.html @@ -0,0 +1,250 @@ + + + + + + + + + + + +
+ + +
+ + +
+ 返回 + + 导出 + +
+ + + +
+ +   +
+
+ +   +
+
+ + 搜索 +
+
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
支付订单号充值时间玩家账号游戏名称所属推广员充值ip游戏区服角色名称订单金额实付金额充值方式
aOh! 暂时还没有内容!
{$data.pay_order_number}{$data.pay_time}{$data.user_account}{$data.game_name}{$data.promote_account}{$data.spend_ip}{$data.server_name}{$data.game_player_name}{$data.cost}{$data.pay_amount}{$data.pay_way}
总计{$sum_amount}0
+
+
+
+ + {$_page|default=''} +
+
+ + + + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + +