From 84fe51efef06f25f8408fbe14618ff5e931ac657 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 24 Mar 2020 09:45:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93/=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=AE=A2=E5=8D=95=20=E6=B8=B8=E6=88=8F=E5=90=8D?= =?UTF-8?q?=E5=AD=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 10 +++- .../Controller/PayChannelController.class.php | 47 ++++++++++++------- .../Controller/TestOrderController.class.php | 9 +++- .../Admin/View/PayChannel/gameDetail.html | 2 + .../Admin/View/PayChannel/testDetail.html | 3 ++ Application/Admin/View/TestOrder/lists.html | 3 ++ 6 files changed, 55 insertions(+), 19 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index eba9d5083..e185ea878 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2394,6 +2394,7 @@ class ExportController extends Controller array('user_account', '测试账号'), array('pay_time', '充值时间'), array('game_name', '游戏名称'), + array('sdk_version', '设备名称'), array('order_amount', '订单金额'), array('pay_amount', '实付金额'), array('pay_way', '充值方式'), @@ -2440,7 +2441,10 @@ class ExportController extends Controller } - $orderData = M('test_order', 'tab_')->where($map)->order('add_time desc')->select(); + $orderData =M('test_order t', 'tab_') + ->field("t.*,g.sdk_version") + ->join("tab_game g on t.game_id = g.id","left") + ->where($map)->order('add_time desc')->select(); $sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find(); $sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find(); $xlsData = []; @@ -2450,12 +2454,14 @@ class ExportController extends Controller }else { $order_list['server_type'] = '测试外网'; } + $order_list['game_name'] =clearGameNameType($v['game_name']); + $order_list['sdk_version'] =$v['sdk_version'] == 1 ? "安卓" : "苹果"; $order_list['order_type'] = get_order_type($v['order_type']); $order_list['order_no'] = $v['order_no']; $order_list['cp_order_no'] = $v['cp_order_no']; $order_list['user_account'] = $v['user_account']; $order_list['pay_time'] = date('Y-m-d H:i:s', $v['pay_time']); - $order_list['game_name'] = $v['game_name']; + // $order_list['game_name'] = $v['game_name']; $order_list['order_amount'] = $v['order_amount']; $order_list['pay_amount'] = $v['pay_amount']; $order_list['pay_way'] = get_pay_way($v['pay_way']); diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index 955bcffea..ca6371d92 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -589,7 +589,7 @@ class PayChannelController extends ThinkController // setPowerPromoteIds($coinMap,'tab_deposit.promote_id'); $spendData = M('spend','tab_') - ->field("pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way") + ->field("pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way,sdk_version") ->where($map) ->select(false); // var_dump($spendData);die(); @@ -599,7 +599,7 @@ class PayChannelController extends ThinkController $coinData = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account, - tab_deposit.pay_ip as spend_ip,tab_pay_info.server_name,tab_pay_info.game_player_name, + tab_deposit.pay_ip as spend_ip,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_pay_info.sdk_version, tab_deposit.pay_amount as cost,tab_deposit.pay_amount,tab_deposit.pay_way") ->where($coinMap) ->select(false); @@ -656,6 +656,11 @@ class PayChannelController extends ThinkController foreach ($data as $key => $value) { $data[$key]['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']); + + if ($model == 'spend') { + $data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']); + $data[$key]['sdk_version'] =$data[$key]['sdk_version'] == 1 ? "安卓" : "苹果"; + } } $sql = "select count(1) as count from ({$unionSql})t;"; @@ -772,7 +777,7 @@ class PayChannelController extends ThinkController } $spendData = M('spend','tab_') - ->field("pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way") + ->field("pay_order_number,pay_time,user_account,game_name,sdk_version,promote_account,spend_ip,server_name,game_player_name,cost,pay_amount,pay_way") ->where($map) ->select(false); // var_dump($spendData);die(); @@ -782,7 +787,7 @@ class PayChannelController extends ThinkController $coinData = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") - ->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account, + ->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_pay_info.sdk_version,tab_deposit.promote_account, tab_deposit.pay_ip as spend_ip,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") ->where($coinMap) @@ -825,7 +830,7 @@ class PayChannelController extends ThinkController if ($model == 'spend') { - $xlsCell = array('支付订单号', '充值时间', '玩家账号', '游戏名称', '所属推广员', '充值ip', '游戏区服', '角色名称', '订单金额', '实付金额', '充值方式'); + $xlsCell = array('支付订单号', '充值时间', '玩家账号', '游戏名称', '设备名称','所属推广员', '充值ip', '游戏区服', '角色名称', '订单金额', '实付金额', '充值方式'); $unionSql = "{$spendData} UNION ALL {$coinData}"; } elseif($model == 'coin_pay_order') { $xlsCell = array('支付订单号', '充值时间', '所属推广员', '订单金额', '实付金额', '充值方式'); @@ -863,8 +868,12 @@ class PayChannelController extends ThinkController $sql = "select * from ({$unionSql})t order by pay_time DESC limit {$page},{$perSize};"; $xlsData = M()->query($sql); - + foreach ($xlsData as $k => $v) { + if ($model == 'spend') { + $v['game_name'] =clearGameNameType($v['game_name']); + $v['sdk_version'] =$v['sdk_version'] == 1 ? "安卓" : "苹果"; + } $v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); $v['pay_way'] = get_pay_way($v['pay_way']); @@ -973,7 +982,7 @@ class PayChannelController extends ThinkController } // setPowerPromoteIds($map,'promote_id'); $data = M('spend','tab_') - ->field("pay_order_number,order_number,user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status") + ->field("pay_order_number,order_number,user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status,sdk_version") ->join('inner join tab_test_white_list on tab_spend.user_id=tab_test_white_list.user_id') ->where($map) // ->order('tab_spend.id DESC') @@ -1001,7 +1010,7 @@ 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("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_pay_info.game_name,tab_pay_info.server_name,tab_pay_info.game_player_name,tab_pay_info.sdk_version,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($coinMap) ->select(false); @@ -1027,6 +1036,9 @@ class PayChannelController extends ThinkController $data[$key]['pay_type'] = get_pay_way($value['pay_type']); + $data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']); + $data[$key]['sdk_version'] =$data[$key]['sdk_version'] == 1 ? "安卓" : "苹果"; + if ($value['pay_way']==1 || $value['pay_way']==9 ) { $data[$key]['pay_way'] = '支付宝'; } else if ($value['pay_way']==2 || $value['pay_way']==3 ) { @@ -1098,6 +1110,8 @@ class PayChannelController extends ThinkController $data[$key]['pay_time'] = Date('Y-m-d H:i:s',$value['pay_time']); $data[$key]['pay_type'] = get_pay_way($value['pay_type']); + $data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']); + $data[$key]['sdk_version'] ="苹果"; if ($value['pay_way']==1 || $value['pay_way']==9 ) { $data[$key]['pay_way'] = '支付宝'; @@ -1288,7 +1302,7 @@ class PayChannelController extends ThinkController if ($model == 'spend') { - $xlsCell = array('支付订单号', 'cp订单号', '测试账号', '充值时间', '游戏名称', '游戏区服', + $xlsCell = array('支付订单号', 'cp订单号', '测试账号', '充值时间', '游戏名称','设备名称', '游戏区服', '角色名称', '订单金额', ' 实付金额 ', '充值方式', '支付渠道', '游戏通知状态',); mb_convert_variables('GBK', 'UTF-8', $xlsCell); @@ -1300,7 +1314,7 @@ class PayChannelController extends ThinkController // setPowerPromoteIds($map,'promote_id'); $data = M('spend','tab_') - ->field("pay_order_number,order_number,user_account,pay_time,game_name,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status") + ->field("pay_order_number,order_number,user_account,pay_time,game_name,sdk_version,server_name,game_player_name,cost,pay_amount,pay_way as pay_type,pay_way,pay_game_status") ->join('inner join tab_test_white_list on tab_spend.user_id=tab_test_white_list.user_id') ->where($map) // ->order('tab_spend.id DESC') @@ -1331,7 +1345,7 @@ 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("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_pay_info.game_name,tab_pay_info.sdk_version,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($coinMap) ->select(false); @@ -1354,6 +1368,8 @@ class PayChannelController extends ThinkController $value['pay_order_number'] = "'".$value['pay_order_number']; $value['order_number'] = "'".$value['order_number']; + $value['game_name'] =clearGameNameType($value['game_name']); + $value['sdk_version'] =$value['sdk_version'] == 1 ? "安卓" : "苹果"; if (!$value['order_number']) { $data[$key]['order_number'] = '无'; @@ -1412,7 +1428,7 @@ class PayChannelController extends ThinkController } elseif($model == 'game_supersign') { - $xlsCell = array('支付订单号', '测试账号', '充值时间', '游戏名称', + $xlsCell = array('支付订单号', '测试账号', '充值时间', '游戏名称','设备名称', '订单金额', ' 实付金额 ', '充值方式', '支付渠道',); mb_convert_variables('GBK', 'UTF-8', $xlsCell); @@ -1450,19 +1466,18 @@ class PayChannelController extends ThinkController $page = ($i - 1) * $perSize; $data = M('game_supersign', 'tab_') - ->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") + ->field("order_id as pay_order_number,account as user_account,pay_time,game_name,@t:='苹果' sdk_version,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) ->limit($page ,$perSize) ->order('tab_game_supersign.id DESC') ->select(); - 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['game_name'] =clearGameNameType($value['game_name']); $value['pay_type'] = get_pay_way($value['pay_type']); if ($value['pay_way'] == 1 || $value['pay_way'] == 9) { @@ -1499,7 +1514,7 @@ class PayChannelController extends ThinkController $map['create_time'] = $map['pay_time']; unset($map['pay_time']); } -// setPowerPromoteIds($map,'tab_deposit.promote_id'); + // setPowerPromoteIds($map,'tab_deposit.promote_id'); $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") diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index 6ba7a699a..10f36f285 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -47,7 +47,14 @@ class TestOrderController extends ThinkController $timeend = strtotime($_REQUEST['timeend'])+86399; $map['pay_time'] = array("ELT",$timeend); } - $order_list = M('test_order', 'tab_')->where($map)->page($page,$row)->order('add_time desc')->select(); + $order_list = M('test_order t', 'tab_') + ->field("t.*,g.sdk_version") + ->join("tab_game g on t.game_id = g.id","left") + ->where($map)->page($page,$row)->order('add_time desc')->select(); + foreach ($order_list as $k => &$v) { + $v['game_name'] =clearGameNameType($v['game_name']); + $v['sdk_version'] =$v['sdk_version'] == 1 ? "安卓" : "苹果"; + } $sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find(); $sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find(); diff --git a/Application/Admin/View/PayChannel/gameDetail.html b/Application/Admin/View/PayChannel/gameDetail.html index a185fecf9..3839b3798 100644 --- a/Application/Admin/View/PayChannel/gameDetail.html +++ b/Application/Admin/View/PayChannel/gameDetail.html @@ -124,6 +124,7 @@ 玩家账号 游戏名称 + 设备名称 所属推广员 @@ -159,6 +160,7 @@ {$data.pay_time} {$data.user_account} {$data.game_name} + {$data.sdk_version} {$data.promote_account} {$data.spend_ip} {$data.server_name} diff --git a/Application/Admin/View/PayChannel/testDetail.html b/Application/Admin/View/PayChannel/testDetail.html index 95a64b1b0..3df675051 100644 --- a/Application/Admin/View/PayChannel/testDetail.html +++ b/Application/Admin/View/PayChannel/testDetail.html @@ -124,6 +124,7 @@ 充值时间 游戏名称 + 设备名称 游戏区服 @@ -160,6 +161,7 @@ {$data.user_account} {$data.pay_time} {$data.game_name} + {$data.sdk_version} {$data.server_name} {$data.game_player_name} {$data.cost} @@ -175,6 +177,7 @@ ------ ------ ------ + ------ ------ ------ {$sumAllData.cost} diff --git a/Application/Admin/View/TestOrder/lists.html b/Application/Admin/View/TestOrder/lists.html index e12feddc6..2595921aa 100644 --- a/Application/Admin/View/TestOrder/lists.html +++ b/Application/Admin/View/TestOrder/lists.html @@ -124,6 +124,7 @@ 充值时间 游戏名称 + 设备名称 订单金额 @@ -158,6 +159,7 @@ {$data.user_account} {$data.pay_time|date='Y-m-d H:i:s',###} {$data.game_name} + {$data.sdk_version} {$data.order_amount} {$data.pay_amount} {$data.pay_way|get_pay_way} @@ -173,6 +175,7 @@ ------ ------ ------ + ------ {$sum_order_amount['sum_order_amount']} {$sum_pay_amount['sum_order_amount']} ------