From 10aa8cf81c208cdaa46dc914c07145069053909a Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Sat, 21 Dec 2019 11:48:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=88=E7=BB=93=E7=BB=9F=E8=AE=A1=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 60 ++++-- .../Controller/PayChannelController.class.php | 190 +++++++++++++++--- .../Admin/View/Finance/payTypeStatistics.html | 15 +- .../Admin/View/PayChannel/gameDetail.html | 2 +- Application/Admin/View/PayChannel/index.html | 14 +- .../Admin/View/PayChannel/testDetail.html | 2 +- 6 files changed, 218 insertions(+), 65 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 770a16df5..2b5771476 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -982,10 +982,20 @@ class FinanceController extends ThinkController */ public function payTypeStatistics() { + $time = array('egt', 0);; + + if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { + $time = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); + } elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { + $time = array('between', [strtotime($_REQUEST['timestart']), time()]); + } elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { + $time = array('elt', (strtotime($_REQUEST['timeend']) + 86399)); + } + //获取现金充值 $cashStatistics = M('spend', 'tab_') - ->field('pay_way,SUM(pay_amount) AS pay_amount') - ->where(['pay_status' => 1,'pay_way'=>['egt',1]]) + ->field('pay_way,"" as pay_type,SUM(pay_amount) AS pay_amount') + ->where(['pay_status' => 1,'pay_way'=>['egt',1],'pay_time'=>$time]) ->group('pay_way') ->select(); foreach ($cashStatistics as $key => $value) { @@ -1000,42 +1010,46 @@ class FinanceController extends ThinkController 'tab_deposit.pay_status' => 1, 'tab_deposit.pay_way' => ['gt', 0], 'extend'=>['eq',''] - ])->field('tab_deposit.pay_way, SUM(tab_deposit.pay_amount) AS balance') + ,'tab_deposit.create_time'=>$time + ])->field('tab_deposit.pay_way,"" as pay_type, SUM(tab_deposit.pay_amount) AS balance') ->join("inner join tab_pay_info on tab_pay_info.order_id=tab_deposit.pay_order_number") ->group('tab_deposit.pay_way') ->select(); foreach ($deposit as $key => $value) { if (!array_key_exists($value['pay_way'], $cashStatistics)) { $cashStatistics[$value['pay_way']] = $value; - $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['pay_type'] = getPayType($value['pay_way']);//充值方式文字影视 + $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; } $cashStatistics[$value['pay_way']]['balance'] = $value['balance'];//别表的平台币充值 } //超级签数据 $superSignData = M('game_supersign','tab_') - ->field("pay_way,sum(pay_price) as pay_amount") + ->field("pay_way,'' as pay_type,sum(pay_price) as pay_amount") ->where([ 'pay_status' => 1, 'pay_way' => ['gt', 0], + 'pay_time'=>$time ]) ->group('pay_way') ->select(); foreach ($superSignData as $key => $value) { if (!array_key_exists($value['pay_way'], $cashStatistics)) { $cashStatistics[$value['pay_way']] = $value; - $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['pay_type'] = getPayType($value['pay_way']);//充值方式文字影视 + $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; + $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 } //绑定币数据 $bindRechargeData = M('bind_recharge','tab_') - ->field('pay_way,sum(real_amount) as pay_amount') + ->field('pay_way,"" as pay_type,sum(real_amount) as pay_amount') ->where([ 'pay_status' => 1, 'pay_way' => ['gt', 0], + 'create_time'=>$time ]) ->group('pay_way') ->select(); @@ -1048,18 +1062,19 @@ class FinanceController extends ThinkController if (!array_key_exists($value['pay_way'], $cashStatistics)) { $cashStatistics[$value['pay_way']] = $value; - $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['pay_type'] = getPayType($value['pay_way']);//充值方式文字影视 + $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; + $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 } //推广后台 $spreadData = M("coin_pay_order","tab_") - ->field("pay_way,sum(real_amount) as pay_amount") + ->field("pay_way,'' as pay_type,sum(real_amount) as pay_amount") ->where([ 'order_status'=>['egt',1], - 'pay_way'=>['egt',1] + 'pay_way'=>['egt',1],'pay_time'=>$time ]) ->group('pay_way') ->select(); @@ -1072,8 +1087,9 @@ class FinanceController extends ThinkController if (!array_key_exists($value['pay_way'], $cashStatistics)) { $cashStatistics[$value['pay_way']] = $value; - $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['pay_type'] = getPayType($value['pay_way']);//充值方式文字影视 + $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; + $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 } @@ -1083,11 +1099,12 @@ class FinanceController extends ThinkController $offcialmap['pay_source'] = 0; $offcialData = M('deposit','tab_') - ->field("pay_way,sum(pay_amount) as pay_amount") + ->field("pay_way,'' as pay_type,sum(pay_amount) as pay_amount") ->where([ 'pay_status'=>1, 'pay_way'=>['egt',1], 'pay_source'=>0, + 'create_time'=>$time ]) ->group('pay_way') ->select(); @@ -1100,8 +1117,9 @@ class FinanceController extends ThinkController if (!array_key_exists($value['pay_way'], $cashStatistics)) { $cashStatistics[$value['pay_way']] = $value; - $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['pay_type'] = getPayType($value['pay_way']);//充值方式文字影视 + $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; + $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 } @@ -1109,11 +1127,27 @@ class FinanceController extends ThinkController foreach ($cashStatistics as $key => $value) { $cashStatistics[$key]['total'] = $value['pay_amount'] + $value['balance'];//添加列表合计 } + + + // var_dump($cashStatistics);die(); //底部总计 $all_pay_amount = array_sum(array_column($cashStatistics, 'pay_amount'));//现金充值总计 $all_balance = array_sum(array_column($cashStatistics, 'balance'));//平台币充值总计 $all_total = array_sum(array_column($cashStatistics, 'total'));//合计总计 + + $this->meta_title = "平台统计"; + if($_REQUEST['export']) { + + foreach($cashStatistics as $key =>$value) { + unset($cashStatistics[$key]['pay_way']); + } + + db2csv(array_merge($cashStatistics, + [0=>['pay_type'=>'总计','pay_amount'=>$all_pay_amount,'balance'=>$all_balance,'total'=>$all_total]]),'平台统计' + ,['支付方式','现金充值','平台币充值','合计']); + } + $this->assign('all_pay_amount', $all_pay_amount); $this->assign('all_balance', $all_balance); $this->assign('all_total', $all_total); diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index fc84b2919..023d1eb7b 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -379,17 +379,17 @@ class PayChannelController extends ThinkController if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { $map['pay_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); - $coinMap['tab_pay_info.create_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); + $coinMap['tab_deposit.create_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); $spreadMap['create_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); $offcialmap['create_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); } elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { $map['pay_time'] = array('between', [strtotime($_REQUEST['timestart']), time()]); - $coinMap['tab_pay_info.create_time'] = array('between', [strtotime($_REQUEST['timestart']), time()]); + $coinMap['tab_deposit.create_time'] = array('between', [strtotime($_REQUEST['timestart']), time()]); $spreadMap['create_time'] = array('between', [strtotime($_REQUEST['timestart']), time()]); $offcialmap['create_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); } elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { $map['pay_time'] = array('elt', (strtotime($_REQUEST['timeend']) + 86399)); - $coinMap['tab_pay_info.create_time'] = array('elt', (strtotime($_REQUEST['timeend']) + 86399)); + $coinMap['tab_deposit.create_time'] = array('elt', (strtotime($_REQUEST['timeend']) + 86399)); $spreadMap['create_time'] = array('elt', (strtotime($_REQUEST['timeend']) + 86399)); $offcialmap['create_time'] = array('between', [strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399]); } @@ -529,7 +529,7 @@ class PayChannelController extends ThinkController } } - $this->meta_title = "测试统计"; + $this->meta_title = "游戏订单查看"; $sumAllData['sum'] = $sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount']; // var_dump($sumAllData);die(); $this->assign('sumAllData',$sumAllData); @@ -794,13 +794,17 @@ class PayChannelController extends ThinkController $map['tab_deposit.user_account'] = $map['user_account']; } + $coinMap = $map; + $coinMap['tab_deposit.create_time'] = $map['pay_time']; + unset($coinMap['pay_time']); + $coinData = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id") ->field("pay_order_number,tab_deposit.order_number,tab_deposit.user_account,tab_deposit.create_time as pay_time, tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_deposit.pay_amount as cost, tab_deposit.pay_amount,tab_deposit.pay_way as pay_type,tab_deposit.pay_way,'' as pay_game_status") - ->where($map) + ->where($coinMap) ->select(false); $page = ($page-1) * $row; $count = "select count(*) as count from ({$data} UNION ALL {$coinData})t;"; @@ -851,14 +855,14 @@ class PayChannelController extends ThinkController ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id") ->field("sum(tab_deposit.pay_amount) as cost,sum(tab_deposit.pay_amount) as pay_amount,tab_deposit.pay_way") - ->where($map) + ->where($coinMap) ->find(); $coinDataSumSql = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id") ->field("sum(tab_deposit.pay_amount) as cost,sum(tab_deposit.pay_amount) as pay_amount,tab_deposit.pay_way") - ->where($map) + ->where($coinMap) ->group('pay_way') ->select(false); @@ -1064,12 +1068,17 @@ class PayChannelController extends ThinkController header('Cache-Control: must-revalidate'); header('Pragma: public'); $fp = fopen('php://output', 'a');//打开output流 - mb_convert_variables('GBK', 'UTF-8', $xlsCell); - fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 + $perSize = 50000;//每次查询的条数 if ($model == 'spend') { + $xlsCell = array('支付订单号', 'cp订单号', '测试账号', '充值时间', '游戏名称', '游戏区服', + '角色名称', '订单金额', ' 实付金额 ', '充值方式', '支付渠道', '游戏通知状态',); + + mb_convert_variables('GBK', 'UTF-8', $xlsCell); + fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 + if ($_REQUEST['game_id']) { $map['game_id'] = $_REQUEST['game_id']; } @@ -1085,13 +1094,17 @@ class PayChannelController extends ThinkController $map['tab_deposit.user_account'] = $map['user_account']; } + + $coinMap = $map; + $coinMap['tab_deposit.create_time'] = $map['pay_time']; + unset($coinMap['pay_time']); $coinData = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id") ->field("pay_order_number,tab_deposit.order_number,tab_deposit.user_account,tab_deposit.create_time as pay_time, tab_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_deposit.pay_amount as cost, tab_deposit.pay_amount,tab_deposit.pay_way as pay_type,tab_deposit.pay_way,'' as pay_game_status") - ->where($map) + ->where($coinMap) ->select(false); $count = "select count(*) as count from ({$data} UNION ALL {$coinData})t;"; @@ -1110,13 +1123,16 @@ class PayChannelController extends ThinkController foreach ($data as $key => $value) { + $value['pay_order_number'] = "'".$value['pay_order_number']; + $value['order_number'] = "'".$value['order_number']; + if (!$value['order_number']) { $data[$key]['order_number'] = '无'; } - $data[$key]['pay_time'] = Date('Y-m-d H:i:s', $value['pay_time']); + $value['pay_time'] = Date('Y-m-d H:i:s', $value['pay_time']); - $data[$key]['pay_type'] = get_pay_way($value['pay_type']); + $value['pay_type'] = get_pay_way($value['pay_type']); if ($value['pay_way'] == 1 || $value['pay_way'] == 9) { $value['pay_way'] = '支付宝'; @@ -1142,12 +1158,11 @@ class PayChannelController extends ThinkController fputcsv($fp, $value); } - unset($xlsData);//释放变量的内存 + unset($data);//释放变量的内存 //刷新输出缓冲到浏览器 ob_flush(); flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } - die(); $field = "sum(cost) as cost,sum(pay_amount) as pay_amount,pay_way"; @@ -1155,18 +1170,25 @@ class PayChannelController extends ThinkController ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id") ->field("sum(tab_deposit.pay_amount) as cost,sum(tab_deposit.pay_amount) as pay_amount,tab_deposit.pay_way") - ->where($map) + ->where($coinMap) ->find(); $coinDataSumSql = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->join("inner join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id") ->field("sum(tab_deposit.pay_amount) as cost,sum(tab_deposit.pay_amount) as pay_amount,tab_deposit.pay_way") - ->where($map) + ->where($coinMap) ->group('pay_way') ->select(false); } elseif($model == 'game_supersign') { + + $xlsCell = array('支付订单号', '测试账号', '充值时间', '游戏名称', + '订单金额', ' 实付金额 ', '充值方式', '支付渠道',); + + mb_convert_variables('GBK', 'UTF-8', $xlsCell); + fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 + if ($map['pay_order_number']) { $map['order_id'] = $map['pay_order_number']; unset($map['pay_order_number']); @@ -1196,7 +1218,7 @@ class PayChannelController extends ThinkController $page = ($i - 1) * $perSize; $data = M('game_supersign', 'tab_') - ->field("order_id as pay_order_number,trade_id as order_number,account as user_account,pay_time,game_name,pay_price as cost,pay_price as pay_amount,pay_way as pay_type,pay_way") + ->field("order_id as pay_order_number,account as user_account,pay_time,game_name,pay_price as cost,pay_price as pay_amount,pay_way as pay_type,pay_way") ->join('inner join tab_test_white_list on tab_game_supersign.user_id=tab_test_white_list.user_id') ->join('left join tab_game on tab_game_supersign.game_id= tab_game.id') ->where($map) @@ -1206,42 +1228,94 @@ class PayChannelController extends ThinkController foreach ($data as $key => $value) { + $value['pay_order_number'] = "'".$value['pay_order_number']; + $value['pay_time'] = Date('Y-m-d H:i:s', $value['pay_time']); + $value['pay_type'] = get_pay_way($value['pay_type']); + + if ($value['pay_way'] == 1 || $value['pay_way'] == 9) { + $value['pay_way'] = '支付宝'; + } else if ($value['pay_way'] == 2 || $value['pay_way'] == 3) { + $value['pay_way'] = '微信支付'; + } else if ($value['pay_way'] == 15) { + $value['pay_way'] = '快捷支付'; + } else if ($value['pay_way']) { + $value['pay_way'] = '其他支付'; + } mb_convert_variables('GBK', 'UTF-8', $value); fputcsv($fp, $value); } - unset($xlsData);//释放变量的内存 + unset($data);//释放变量的内存 //刷新输出缓冲到浏览器 ob_flush(); flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } - $field = "pay_price as cost,sum(pay_price) as pay_amount,pay_way"; } elseif($model == 'deposit') { + + $xlsCell = array('支付订单号', 'cp订单号', '测试账号', '充值时间', '订单金额', ' 实付金额 ', '充值方式', '支付渠道'); + + mb_convert_variables('GBK', 'UTF-8', $xlsCell); + fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 + $map['pay_source'] = 0; if ($map['pay_time']) { $map['create_time'] = $map['pay_time']; unset($map['pay_time']); } - $data = M('deposit','tab_') - ->field("pay_order_number,order_number,user_account,create_time as pay_time,pay_amount as cost,pay_amount,pay_way as pay_type,pay_way") - ->join('inner join tab_test_white_list on tab_deposit.user_id=tab_test_white_list.user_id') - ->where($map) - ->page($page, $row) - ->order('tab_deposit.id DESC') - ->select(); - $count = M('deposit','tab_') + $accessNum = M('deposit','tab_') ->field("pay_order_number,order_number,user_account,create_time as pay_time,pay_amount as cost,pay_amount,pay_way as pay_type,pay_way") ->join('inner join tab_test_white_list on tab_deposit.user_id=tab_test_white_list.user_id') ->where($map) - ->page($page, $row) ->order('tab_deposit.id DESC') ->count(); + $pages = ceil($accessNum / $perSize); + + for($i = 1; $i <= $pages; $i++) { + + $page = ($i - 1) * $perSize; + $data = M('deposit', 'tab_') + ->field("pay_order_number,order_number,user_account,create_time as pay_time,pay_amount as cost,pay_amount,pay_way as pay_type,pay_way") + ->join('inner join tab_test_white_list on tab_deposit.user_id=tab_test_white_list.user_id') + ->where($map) + ->limit($page ,$perSize) + ->order('tab_deposit.id DESC') + ->select(); + + foreach ($data as $key => $value) { + + $value['pay_order_number'] = "'".$value['pay_order_number']; + $value['order_number'] = "'".$value['order_number']; + + $value['pay_time'] = Date('Y-m-d H:i:s', $value['pay_time']); + + $value['pay_type'] = get_pay_way($value['pay_type']); + + if ($value['pay_way'] == 1 || $value['pay_way'] == 9) { + $value['pay_way'] = '支付宝'; + } else if ($value['pay_way'] == 2 || $value['pay_way'] == 3) { + $value['pay_way'] = '微信支付'; + } else if ($value['pay_way'] == 15) { + $value['pay_way'] = '快捷支付'; + } else if ($value['pay_way']) { + $value['pay_way'] = '其他支付'; + } + + mb_convert_variables('GBK', 'UTF-8', $value); + fputcsv($fp, $value); + } + + unset($data);//释放变量的内存 + //刷新输出缓冲到浏览器 + ob_flush(); + flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 + + } $field = "pay_amount as cost,sum(pay_amount) as pay_amount,pay_way"; } @@ -1265,8 +1339,6 @@ class PayChannelController extends ThinkController $sumAllData['cost'] += $coinDataSum['cost']; } - $this->assign('sumAllData',$sumAllData); - $sumData = "select cost,sum(pay_amount) as pay_amount,pay_way from ({$sumData})t group by pay_way"; @@ -1291,8 +1363,6 @@ class PayChannelController extends ThinkController } - $this->assign('payTypeData',$payTypeData); - foreach($sumData as $key=>$value) { $sumData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.',''); $sumData[$key]['pay_way'] = get_pay_way($value['pay_way']); @@ -1301,7 +1371,63 @@ class PayChannelController extends ThinkController unset($sumData[$key]); } } + //总计 + if ($model == 'spend') { + $sumAllDataother['pay_order_number'] = '总计'; + $sumAllDataother['order_number'] = '------'; + $sumAllDataother['user_account'] = '------'; + $sumAllDataother['pay_time'] = '------'; + $sumAllDataother['game_name'] = '------'; + $sumAllDataother['server_name'] = '------'; + $sumAllDataother['game_player_name'] = '------'; + $sumAllDataother['cost'] = $sumAllData['cost']; + $sumAllDataother['pay_amount'] = $sumAllData['pay_amount']; + $sumAllDataother['pay_type'] = '------'; + $sumAllDataother['pay_way'] = '------'; + $sumAllDataother['pay_game_status'] = '------'; + } elseif($model == 'game_supersign') { + + $sumAllDataother['pay_order_number'] = '总计'; + $sumAllDataother['user_account'] = '------'; + $sumAllDataother['pay_time'] = '------'; + $sumAllDataother['game_name'] = '------'; + $sumAllDataother['cost'] = $sumAllData['cost']; + $sumAllDataother['pay_amount'] = $sumAllData['pay_amount']; + $sumAllDataother['pay_type'] = '------'; + $sumAllDataother['pay_way'] = '------'; + + } elseif($model == 'deposit') { + + $sumAllDataother['pay_order_number'] = '总计'; + $sumAllDataother['order_number'] = '------'; + $sumAllDataother['user_account'] = '------'; + $sumAllDataother['pay_time'] = '------'; + $sumAllDataother['cost'] = $sumAllData['cost']; + $sumAllDataother['pay_amount'] = $sumAllData['pay_amount']; + $sumAllDataother['pay_type'] = '------'; + $sumAllDataother['pay_way'] = '------'; + + } + mb_convert_variables('GBK', 'UTF-8',$sumAllDataother); + fputcsv($fp, $sumAllDataother); + + $sumAllDataPay['pay_order_number'] = '充值方式合计'; + $sumAllDataPay['order_number'] = ''; + //支付渠道合计 + foreach ($payTypeData as $key => $value) { + $sumAllDataPay['order_number'] .= $key.':'.$value.' '; + } + mb_convert_variables('GBK', 'UTF-8',$sumAllDataPay); + fputcsv($fp, $sumAllDataPay); + //支付渠道 + $sumDataPay['pay_order_number'] = '支付渠道'; + $sumDataPay['order_number'] = ''; + foreach ($sumData as $key => $value) { + $sumDataPay['order_number'] .= $value['pay_way'].':'.$value['pay_amount'].' '; + } + mb_convert_variables('GBK', 'UTF-8',$sumDataPay); + fputcsv($fp, $sumDataPay); } diff --git a/Application/Admin/View/Finance/payTypeStatistics.html b/Application/Admin/View/Finance/payTypeStatistics.html index 7fd13a3aa..3c1f1eaf0 100644 --- a/Application/Admin/View/Finance/payTypeStatistics.html +++ b/Application/Admin/View/Finance/payTypeStatistics.html @@ -97,18 +97,11 @@
- 搜索 - 导出
@@ -149,7 +142,7 @@ {$data.pay_type} {$data.pay_amount} {$data.balance}0 - {$data.total}0 + {$data.total}0 diff --git a/Application/Admin/View/PayChannel/gameDetail.html b/Application/Admin/View/PayChannel/gameDetail.html index c20e6e522..8b049486f 100644 --- a/Application/Admin/View/PayChannel/gameDetail.html +++ b/Application/Admin/View/PayChannel/gameDetail.html @@ -30,7 +30,7 @@ diff --git a/Application/Admin/View/PayChannel/index.html b/Application/Admin/View/PayChannel/index.html index 3a65bf7d1..c899fc589 100644 --- a/Application/Admin/View/PayChannel/index.html +++ b/Application/Admin/View/PayChannel/index.html @@ -171,10 +171,10 @@ {$data['pay_amount']} {$data['platform_coin']} - {$data['test_coin']} + {$data['test_coin']} {$data['sum']} - 订单查看 + 订单查看 @@ -182,20 +182,20 @@ 超级签 {$superSignData['pay_amount']}0 0 - {$superSignData.test_coin}0 + {$superSignData.test_coin}0 {$superSignData['sum']}0 - 订单查看 + 订单查看 官网 {$offcialData['pay_amount']} 0 - {$offcialData.test_coin}0 + {$offcialData.test_coin}0 {$offcialData['sum']}0 - 订单查看 + 订单查看 @@ -205,7 +205,7 @@ 0 {$spreadData['sum']}0 - 订单查看 + 订单查看 diff --git a/Application/Admin/View/PayChannel/testDetail.html b/Application/Admin/View/PayChannel/testDetail.html index 742a150d7..543864127 100644 --- a/Application/Admin/View/PayChannel/testDetail.html +++ b/Application/Admin/View/PayChannel/testDetail.html @@ -30,7 +30,7 @@