master
ELF 3 years ago
parent cb06ecc2f2
commit 50bed5329c

@ -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'),

@ -268,6 +268,7 @@
<th>角色ID</th>
<th>角色名称</th>
<th>订单金额</th>
<th>折扣</th>
<th><a class="paixu" data-order='pay_amount'>
实付金额
@ -353,6 +354,7 @@
<td>{$data.game_player_name}</td>
</empty>
<td>{$data.cost|default=0.00}</td>
<td>{$data.discount_amount|default=0.00}</td>
<td><span>{$data.pay_amount}</span></td>
<td>{:get_pay_way($data['pay_way'])}</td>
<td>

@ -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"] = "--";

@ -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", ''));

@ -195,6 +195,8 @@
<th>支付方式</th>
<th>充值状态</th>
<th>订单金额</th>
<th>折扣金额</th>
<th>实付金额</th>
<th>游戏名称</th>
<th>设备类型</th>
<th>区服</th>
@ -220,6 +222,8 @@
<td>{$vo.pay_order_number}</td>
<td>{:get_pay_way($vo['pay_way'])}</td>
<td>{$vo.pay_status}</td>
<td>{$vo.cost}</td>
<td>{$vo.discount_amount}</td>
<td>{$vo.pay_amount}</td>
<td>{$vo.game_name}</td>
<td>{$vo.sdk_version}</td>
@ -241,7 +245,9 @@
<td>--</td>
<td>--</td>
<td>--</td>
<td>{$income}</td>
<td>{$aggregation.cost}</td>
<td>{$aggregation.discount_amount}</td>
<td>{$aggregation.pay_amount}</td>
<td>--</td>
<td>--</td>
<td>--</td>

Loading…
Cancel
Save