支付渠道统计bug修正,官网与推广后台充值计入平台币

master
zhengyongxing 5 years ago
parent 9b5697a859
commit b0899f3fc9

@ -1019,10 +1019,8 @@ class FinanceController extends ThinkController
'pay_source' => 2,
'tab_deposit.pay_status' => 1,
'tab_deposit.pay_way' => ['gt', 0],
'extend'=>['eq','']
,'tab_deposit.create_time'=>$time,
'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) {
@ -1076,7 +1074,7 @@ class FinanceController extends ThinkController
$cashStatistics[$value['pay_way']]['pay_amount'] = '0.00';
$cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值
}
$cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值
$cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值
}
//推广后台
@ -1101,7 +1099,7 @@ class FinanceController extends ThinkController
$cashStatistics[$value['pay_way']]['pay_amount'] = '0.00';
$cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值
}
$cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值
$cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值
}
//官网充值
$offcialmap['pay_status'] = 1;
@ -1131,7 +1129,7 @@ class FinanceController extends ThinkController
$cashStatistics[$value['pay_way']]['pay_amount'] = '0.00';
$cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值
}
$cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值
$cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值
}
foreach ($cashStatistics as $key => $value) {

@ -80,7 +80,6 @@ class PayChannelController extends ThinkController
->where($coinMap)
->sum('tab_deposit.pay_amount');
// var_dump($coinSum);die();
$this->assign('coinSum',$coinSum);
$data = array_merge($data,$coinData);
$data = $this->unique_multi_array($data,'game_id');
@ -251,9 +250,9 @@ class PayChannelController extends ThinkController
}
//汇总数据
$sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] +
$offcialData['pay_amount'] + $bindRechargeData['pay_amount'] + $spreadData['pay_amount'];
$sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'];
$sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount'];
$sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'] +
$offcialData['pay_amount'] + $spreadData['pay_amount'];
$sumData['test_coin'] = $sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin'];
$sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'];
@ -277,6 +276,8 @@ class PayChannelController extends ThinkController
$payTypeDataExport['pay_amount'] .= $key.''.$value." ";
}
}
$payTypeDataExport['pay_amount'] .= "平台币直充金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)".
($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost);
$channelDataExport['game_name'] = '支付渠道';
foreach($channelData as $key => $value) {
@ -295,6 +296,8 @@ class PayChannelController extends ThinkController
$this->meta_title = "支付渠道统计";
$size = $row;//每页显示的记录数
$data = array_slice($data, ($arraypage - 1) * $size, $size);
//平台币直充金额,下面列表
$this->assign('coinSum',$coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost);
$this->assign('sumData',$sumData);
$this->assign('channelData',$channelData);
@ -438,6 +441,9 @@ class PayChannelController extends ThinkController
$coinMap['tab_deposit.pay_way'] =$spreadMap['pay_way']=$map['pay_way'] = array('egt',1);
$offcialmap['pay_way'] = array('egt',1);
if (!empty($_REQUEST['pay_way']) || $_REQUEST['pay_way']=='0') {
if ($_REQUEST['pay_way']=="2") {
$_REQUEST['pay_way'] = ['in', '2,3,4'];
}
$map['pay_way'] = $_REQUEST['pay_way'];
$coinMap['tab_deposit.pay_way'] = $_REQUEST['pay_way'];
$spreadMap['pay_way'] = $_REQUEST['pay_way'];
@ -563,7 +569,11 @@ class PayChannelController extends ThinkController
foreach ($sumData as $key => $value) {
if ($value['pay_way']>=1) {
$sumAllData['pay_amount'] += $value['pay_amount'];
if($model == 'deposit'||$model == 'coin_pay_order') {
$sumAllData['platform_amount'] += $value['pay_amount'];
} else {
$sumAllData['pay_amount'] += $value['pay_amount'];
}
}
}
@ -769,7 +779,11 @@ class PayChannelController extends ThinkController
foreach ($sumData as $key => $value) {
if ($value['pay_way']>=1) {
$sumAllData['pay_amount'] += $value['pay_amount'];
if($model == 'deposit'||$model == 'coin_pay_order') {
$sumAllData['platform_amount'] += $value['pay_amount'];
} else {
$sumAllData['pay_amount'] += $value['pay_amount'];
}
}
}

@ -139,7 +139,7 @@
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td ><if condition="$data.pay_type neq ''">{$data.pay_type}<else/></if></td>
<td ><if condition="$data.pay_type neq ''"><if condition="$data.pay_type eq '微信(扫码)'"> 微信<else/>{$data.pay_type}</if><else/></if></td>
<td ><if condition="$data.pay_amount neq ''">{$data.pay_amount}<else/></if></td>
<td ><if condition="$data.balance neq ''">{$data.balance}<else/>0</if></td>
<td ><if condition="$data.total neq ''">{$data.total}<else/>0</if></td>

@ -71,21 +71,29 @@
</div>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="pay_way" name="pay_way" class="select_gallery" style="width:120px;">
<option value="">请选择支付渠道</option>
<option value="1">支付宝</option>
<option value="2">微信(扫码)</option>
<option value="3">微信app</option>
<option value="4">威富通</option>
<option value="5">聚宝云</option>
<option value="6">竣付通</option>
<option value="7">金猪</option>
<option value="9">双乾支付-支付宝</option>
<option value="10">双乾支付-银联</option>
<option value="15">双乾支付-快捷</option>
<option value="0">平台币</option>
<option value="-1">绑币</option>
<!-- <div class="input-list input-list-server search_label_rehab">-->
<!-- <select id="pay_way" name="pay_way" class="select_gallery" style="width:120px;">-->
<!-- <option value="">请选择支付渠道</option>-->
<!-- <option value="1">支付宝</option>-->
<!-- <option value="2">微信(扫码)</option>-->
<!-- <option value="3">微信app</option>-->
<!-- <option value="4">威富通</option>-->
<!-- <option value="5">聚宝云</option>-->
<!-- <option value="6">竣付通</option>-->
<!-- <option value="7">金猪</option>-->
<!-- <option value="9">双乾支付-支付宝</option>-->
<!-- <option value="10">双乾支付-银联</option>-->
<!-- <option value="15">双乾支付-快捷</option>-->
<!-- <option value="0">平台币</option>-->
<!-- <option value="-1">绑币</option>-->
<!-- </select>-->
<!-- </div>-->
<div class="input-list input-list-spend search_label_rehab">
<select id="pay_way_id" name="pay_way" class="select_gallery" style="width:120px;">
<option value="">充值方式</option>
<volist name=":cash_pay_way()" id="vo">
<option value="{$vo.key}">{$vo.value}</option>
</volist>
</select>
</div>

@ -188,8 +188,8 @@
</tr>
<tr>
<td><span>官网</span></td>
<td >{$offcialData['pay_amount']}</td>
<td>0</td>
<td >0</td>
<td>{$offcialData['pay_amount']}</td>
<td><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$offcialData.test_coin neq ''">{$offcialData.test_coin}<else/>0</if></a></td>
<td><if condition="$offcialData.pay_amount neq ''">{$offcialData['sum']}<else/>0</if></td>
<td>
@ -198,8 +198,8 @@
</tr>
<tr>
<td><span>推广后台</span></td>
<td ><span><if condition="$spreadData.pay_amount neq ''">{$spreadData['pay_amount']}<else/>0</if></span></td>
<td>0</td>
<td ><span>0</span></td>
<td>{$spreadData['pay_amount']}</td>
<td>0</td>
<td><if condition="$spreadData['pay_amount'] neq ''">{$spreadData['sum']}<else/>0</if></td>
<td>

Loading…
Cancel
Save