公会统计--订单详情 新增所属商户展示

master
zhengyongxing
parent 767ce5734d
commit 58ff5ad1ed

@ -1007,7 +1007,7 @@ class FinanceController extends ThinkController
$map['game_player_name'] = array('like',I("user_nickname").'%'); $map['game_player_name'] = array('like',I("user_nickname").'%');
} }
// var_dump($map);die(); // var_dump($map);die();
$field = "pay_order_number,FROM_UNIXTIME(payed_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way,sdk_version"; $field = "pay_order_number,FROM_UNIXTIME(payed_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way,sdk_version,merchant_id";
$group = ""; $group = "";
$order = "payed_time DESC"; $order = "payed_time DESC";
@ -1017,7 +1017,18 @@ class FinanceController extends ThinkController
$data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row); $data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row);
} }
$merchant_data = M("payment_merchant","tab_")
->field("id,name")
->where("1=1")
->select();
$handle_merchant = [];
foreach ($merchant_data as $key => $value) {
$handle_merchant[$value['id']] = $value['name'];
}
foreach($data as $key => $value) { foreach($data as $key => $value) {
$data[$key]['merchant_name'] = $handle_merchant[$value['merchant_id']];
$data[$key]['pay_way'] = getPayType($value['pay_way']); $data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']); $data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']); $data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
@ -1044,7 +1055,8 @@ class FinanceController extends ThinkController
"game_player_name"=>"角色名称", "game_player_name"=>"角色名称",
"cost"=>"订单金额", "cost"=>"订单金额",
"pay_amount"=>"实付金额", "pay_amount"=>"实付金额",
"pay_way"=>"充值方式" "pay_way"=>"充值方式",
"merchant_name"=>"商户"
); );
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-游戏统计-订单查看-导出"]); addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME,$GetData),'menu'=>"充值-财务管理-游戏统计-订单查看-导出"]);
data2csv($data,"游戏统计订单查看",$dcop); data2csv($data,"游戏统计订单查看",$dcop);

@ -784,7 +784,7 @@ class FinancePromoteController extends AdminController
if (!empty(I('user_nickname'))) { if (!empty(I('user_nickname'))) {
$map['game_player_name'] = array('like',I("user_nickname").'%'); $map['game_player_name'] = array('like',I("user_nickname").'%');
} }
$field = "pay_order_number,FROM_UNIXTIME(payed_time) as pay_time,user_account,user_nickname,game_name,sdk_version,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way,market_admin_id"; $field = "pay_order_number,FROM_UNIXTIME(payed_time) as pay_time,user_account,user_nickname,game_name,sdk_version,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way,market_admin_id,merchant_id";
$group = ""; $group = "";
$order = "pay_time DESC"; $order = "pay_time DESC";
if(isset($_REQUEST['export'])){ if(isset($_REQUEST['export'])){
@ -798,7 +798,18 @@ class FinancePromoteController extends AdminController
$marketAdmins = getAdminUsernameList(array_column($data, 'market_admin_id')); $marketAdmins = getAdminUsernameList(array_column($data, 'market_admin_id'));
} }
$merchant_data = M("payment_merchant","tab_")
->field("id,name")
->where("1=1")
->select();
$handle_merchant = [];
foreach ($merchant_data as $key => $value) {
$handle_merchant[$value['id']] = $value['name'];
}
foreach($data as $key => $value) { foreach($data as $key => $value) {
$data[$key]['merchant_name'] = $handle_merchant[$value['merchant_id']];
$data[$key]['pay_way'] = getPayType($value['pay_way']); $data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']); $data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']);
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']); $data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);

@ -131,6 +131,8 @@
<th >实付金额</th> <th >实付金额</th>
<th >充值方式</th> <th >充值方式</th>
<th >商户</th>
</tr> </tr>
</thead> </thead>
<!-- 列表 --> <!-- 列表 -->
@ -160,11 +162,12 @@
<td >{$data.cost}</td> <td >{$data.cost}</td>
<td >{$data.pay_amount}</td> <td >{$data.pay_amount}</td>
<td >{$data.pay_way}</td> <td >{$data.pay_way}</td>
<td >{$data.merchant_name}</td>
</tr> </tr>
</volist> </volist>
<tr> <tr>
<td ><span>总计</span></td> <td ><span>总计</span></td>
<td colspan="11" ><span><if condition="$sumAll neq ''">累计充值:{$sumAll}<else/>0</if> <td colspan="12" ><span><if condition="$sumAll neq ''">累计充值:{$sumAll}<else/>0</if>
(现金金额:{$sumCash} 平台币:{$sumBalance} 绑币:{$sumInside} (现金金额:{$sumCash} 平台币:{$sumBalance} 绑币:{$sumInside}
</span></td> </span></td>
</tr> </tr>

@ -186,6 +186,8 @@
<th >实付金额</th> <th >实付金额</th>
<th >充值方式</th> <th >充值方式</th>
<th >商户</th>
</tr> </tr>
</thead> </thead>
<!-- 列表 --> <!-- 列表 -->
@ -216,11 +218,12 @@
<td >{$data.cost}</td> <td >{$data.cost}</td>
<td >{$data.pay_amount}</td> <td >{$data.pay_amount}</td>
<td >{$data.pay_way}</td> <td >{$data.pay_way}</td>
<td >{$data.merchant_name}</td>
</tr> </tr>
</volist> </volist>
<tr> <tr>
<td ><span>总计</span></td> <td ><span>总计</span></td>
<td colspan="12" ><span><if condition="$sumAll neq ''">累计充值:{$sumAll}<else/>0</if> <td colspan="13" ><span><if condition="$sumAll neq ''">累计充值:{$sumAll}<else/>0</if>
(现金金额:{$sumCash} 平台币:{$sumBalance} 绑币:{$sumInside} (现金金额:{$sumCash} 平台币:{$sumBalance} 绑币:{$sumInside}
</span></td> </span></td>
</tr> </tr>

Loading…
Cancel
Save