diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index f407c14fe..5f65c24ce 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1234,6 +1234,7 @@ class ExportController extends Controller 'game_player_id' => '角色ID', 'game_player_name' => '角色名称', 'cost' => '订单金额', + 'discount_amount' => '折扣', 'pay_amount' => '实付金额', 'pay_way' => '充值方式', 'pay_status' => L('Order_status'), diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index 040ab7f24..a7c9a6043 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -268,6 +268,7 @@ 角色ID 角色名称 订单金额 + 折扣 实付金额 @@ -353,6 +354,7 @@ {$data.game_player_name} {$data.cost|default=0.00} + {$data.discount_amount|default=0.00} {$data.pay_amount} {:get_pay_way($data['pay_way'])} diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 8b9d60fe0..1c2f1ef38 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -4568,6 +4568,8 @@ public function iosDetailExcelInfo($id,$map) { '玩家账号', '游戏订单', '订单金额', + '折扣金额', + '实付金额', '支付方式', '充值状态', '游戏名称', @@ -4673,6 +4675,8 @@ public function iosDetailExcelInfo($id,$map) { $csvData["user_account"] = $value1["user_account"]; $csvData["pay_order_number"] = $value1["pay_order_number"]; + $csvData["cost"] = $value1["cost"]; + $csvData["discount_amount"] = $value1["discount_amount"]; $csvData["pay_amount"] = $value1["pay_amount"]; $csvData["pay_way"] = $value1["pay_way"]; $csvData['pay_status'] = $value1['pay_status']; @@ -4693,17 +4697,18 @@ public function iosDetailExcelInfo($id,$map) { ob_flush(); flush(); } - $income = '0.00'; - $income = M('Spend', 'tab_') - ->field('sum(tab_spend.pay_amount) as income') + $aggregation = M('Spend', 'tab_') + ->field('sum(tab_spend.cost) as cost, sum(tab_spend.pay_amount) as pay_amount, sum(tab_spend.discount_amount) as discount_amount') ->join('tab_game on tab_spend.game_id = tab_game.id') ->join('left join tab_promote on tab_spend.promote_id = tab_promote.id') ->where($map) ->order('tab_spend.id desc') - ->find()['income']; + ->find(); $csvData1["user_account"] = "合计"; $csvData1["pay_order_number"] = "--"; - $csvData1["pay_amount"] = $income; + $csvData1["cost"] = $aggregation['cost']; + $csvData1["discount_amount"] = $aggregation['discount_amount']; + $csvData1["pay_amount"] = $aggregation['pay_amount']; $csvData1["pay_way"] = "--"; $csvData1['pay_status'] = "--"; $csvData1["game_name"] = "--"; diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 1832365d8..aaf62e9dc 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -141,7 +141,11 @@ class QueryController extends BaseController $data = []; $count = 0; - $income = '0.00'; + $aggregation = [ + 'cost' => '0.00', + 'pay_amount' => '0.00', + 'discount_amount' => '0.00', + ]; if (intval($endTime - $begTime) / (24 * 3600) <= 31 || intval($payedEndTime - $payedBegTime) / (24 * 3600) <= 31) { $data = M('Spend', 'tab_') @@ -158,13 +162,13 @@ class QueryController extends BaseController ->where($map) ->count(); - $income = M('Spend', 'tab_') - ->field('sum(tab_spend.pay_amount) as income') + $aggregation = M('Spend', 'tab_') + ->field('sum(tab_spend.cost) as cost, sum(tab_spend.pay_amount) as pay_amount, sum(tab_spend.discount_amount) as discount_amount') ->join('tab_game on tab_spend.game_id = tab_game.id') ->join('left join tab_promote on tab_spend.promote_id = tab_promote.id') ->where($map) ->order('tab_spend.id desc') - ->find()['income']; + ->find(); } if (!empty($data)) { $promoteIdData = []; @@ -263,7 +267,7 @@ class QueryController extends BaseController } $this->assign('listData', $data); $this->assign('count', $count); - $this->assign('income', $income); + $this->assign('aggregation', $aggregation); $this->assign('initBegTime', $initBegTime); $this->assign('initEndTime', $initEndTime); $this->assign('payedBegTime', I("payed_begtime", '')); diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html index 587322d0e..e2d8917ff 100644 --- a/Application/Home/View/default/Query/recharge.html +++ b/Application/Home/View/default/Query/recharge.html @@ -195,6 +195,8 @@ 支付方式 充值状态 订单金额 + 折扣金额 + 实付金额 游戏名称 设备类型 区服 @@ -220,6 +222,8 @@ {$vo.pay_order_number} {:get_pay_way($vo['pay_way'])} {$vo.pay_status} + {$vo.cost} + {$vo.discount_amount} {$vo.pay_amount} {$vo.game_name} {$vo.sdk_version} @@ -241,7 +245,9 @@ -- -- -- - {$income} + {$aggregation.cost} + {$aggregation.discount_amount} + {$aggregation.pay_amount} -- -- --