Merge branch 'release-1.0.0' of 47.111.118.107:wmtx/platform into release-1.0.0

master
ELF 5 years ago
commit 3246745e58

@ -74,12 +74,11 @@ class PayChannelController extends ThinkController
->group("game_id")
->select();
unset($coinMap['game_id']);
// unset($coinMap['game_id']);
//平台币充值
$coinSum = M('deposit','tab_')
->where($coinMap)
->sum('tab_deposit.pay_amount');
// var_dump($coinSum);die();
$data = array_merge($data,$coinData);
$data = $this->unique_multi_array($data,'game_id');
@ -177,7 +176,7 @@ class PayChannelController extends ThinkController
// setPowerPromoteIds($spreadMap,'promote_id');
//推广后台
$spreadData = M("coin_pay_order","tab_")
->field("0 as game_name,sum(real_amount) as pay_amount,0 as platform_coin,id as test_coin")
->field("0 as game_name,sum(pay_amount) as pay_amount,0 as platform_coin,id as test_coin")
->where($spreadMap)
->find();
$spreadData['pay_amount'] = $spreadData['pay_amount']?$spreadData['pay_amount']:0;
@ -250,11 +249,18 @@ class PayChannelController extends ThinkController
}
//汇总数据
$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'];
if ($_REQUEST['game_id']) {
$sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'];
$sumData['test_coin'] = $sumData['test_coin']+$sumData['test_platform_coin'];
$sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'];
} else {
$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'];
$coinSum = $coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost;
}
if($_REQUEST['export'] == 1) {
@ -276,7 +282,7 @@ class PayChannelController extends ThinkController
$payTypeDataExport['pay_amount'] .= $key.''.$value." ";
}
}
$payTypeDataExport['pay_amount'] .= "平台币直充金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)".
$payTypeDataExport['pay_amount'] .= "平台币直充金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)".
($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost);
$channelDataExport['game_name'] = '支付渠道';
@ -288,6 +294,12 @@ class PayChannelController extends ThinkController
unset($sumData['test_platform_coin']);
if ($_REQUEST['game_id']) {
unset($superSignData);
unset($offcialData);
unset($spreadData);
}
db2csv(array_merge(array_merge(array_merge(array_merge(
array_merge(array_merge(
array_merge($data,[0=>$superSignData]),[0=>$offcialData])),[0=>$spreadData],[0=>$sumData])),[0=>$payTypeDataExport]),[0=>$channelDataExport]),'支付渠道统计导出',$title);
@ -296,8 +308,9 @@ 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('coinSum',$coinSum);
$this->assign('sumData',$sumData);
$this->assign('channelData',$channelData);
@ -374,6 +387,20 @@ class PayChannelController extends ThinkController
->where($map)
->group('pay_way')
->select(false);
if ($_REQUEST['game_id']) {
$map['tab_deposit.pay_way'] = $map['pay_way'];
$map['tab_deposit.create_time'] = $map['create_time'];
$map['tab_deposit.pay_source'] = 2;
$map['tab_pay_info.extend'] = '';
unset($map['pay_way']);
unset($map['create_time']);
$depositData = M('pay_info','tab_')
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->field('sum(pay_amount) as pay_amount,tab_deposit.pay_way as pay_way')
->where($map)
->group('tab_deposit.pay_way')
->select(false);
}
$bindMap['pay_status'] = 1;
$bindMap['pay_way'] = array('egt',1);
@ -390,8 +417,14 @@ class PayChannelController extends ThinkController
->where($bindMap)
->select(false);
if(!$_REQUEST['game_id']) {
$sql = "{$channelData} UNION ALL {$depositData} UNION ALL {$superSignDataPay} UNION ALL {$spreadDataPay} UNION ALL {$bindRechargeData}";
} else {
$sql = "{$channelData} UNION ALL {$depositData}";
}
//将语句整合起来查询
$channelData = "select sum(pay_amount) as pay_amount,pay_way from ({$channelData} UNION ALL {$depositData} UNION ALL {$superSignDataPay} UNION ALL {$spreadDataPay} UNION ALL {$bindRechargeData})t group by pay_way;";
$channelData = "select sum(pay_amount) as pay_amount,pay_way from ({$sql})t group by pay_way;";
// var_dump($channelData);die();
$channelData = M()->query($channelData);
@ -482,7 +515,7 @@ class PayChannelController extends ThinkController
// setPowerPromoteIds($spreadMap,'promote_id');
// $spreadMap['pay_way'] = array('egt',1);
$coin_pay_order = M('coin_pay_order','tab_')
->field("pay_order_number,create_time as pay_time,promote_account,pay_amount as cost,real_amount as pay_amount,pay_way")
->field("pay_order_number,create_time as pay_time,promote_account,pay_amount,real_amount as cost,pay_way")
->where($spreadMap)
->select(false);

@ -78,21 +78,21 @@
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_level" style="color:#444" class="select_gallery" id="promote_level">
<option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>部门长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组长</option>
<option value="4" <?php if ($_POST['promote_level'] == 4):?>selected<?php endif;?>>组员</option>
</select>
-
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
<option value="">请选择推广员</option>
</select>
</div>
<!-- <div class="input-list search_item input-list-gamenoticestatus">-->
<!-- <select name="promote_level" style="color:#444" class="select_gallery" id="promote_level">-->
<!-- <option value="">请选择推广员等级</option>-->
<!-- <option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>-->
<!-- <option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>部门长</option>-->
<!-- <option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组长</option>-->
<!-- <option value="4" <?php if ($_POST['promote_level'] == 4):?>selected<?php endif;?>>组员</option>-->
<!-- </select>-->
<!-- - -->
<!-- </div>-->
<!-- <div class="input-list search_item input-list-gamenoticestatus">-->
<!-- <select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">-->
<!-- <option value="">请选择推广员</option>-->
<!-- </select>-->
<!-- </div>-->
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">

@ -176,36 +176,38 @@
</td>
</tr>
</volist>
<tr>
<td><span>超级签</span></td>
<td ><span><if condition="$superSignData.pay_amount neq ''">{$superSignData['pay_amount']}<else/>0</if></span></td>
<td>0</td>
<td><span><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$superSignData.test_coin neq ''">{$superSignData.test_coin}<else/>0</if></a></span></td>
<td><if condition="$superSignData.pay_amount neq ''">{$superSignData['sum']}<else/>0</if></td>
<td>
<a href="{:U('SuperStatistical/index',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
<tr>
<td><span>官网</span></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>
<a href="{:U('PayChannel/gameDetail',array_merge(array('id'=>21,'model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
<tr>
<td><span>推广后台</span></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>
<a href="{:U('PayChannel/gameDetail',array_merge(array('id'=>21,'model'=>'coin_pay_order','game_name'=>'推广后台'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
<if condition="$_GET['game_id'] eq ''">
<tr>
<td><span>超级签</span></td>
<td ><span><if condition="$superSignData.pay_amount neq ''">{$superSignData['pay_amount']}<else/>0</if></span></td>
<td>0</td>
<td><span><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$superSignData.test_coin neq ''">{$superSignData.test_coin}<else/>0</if></a></span></td>
<td><if condition="$superSignData.pay_amount neq ''">{$superSignData['sum']}<else/>0</if></td>
<td>
<a href="{:U('SuperStatistical/index',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
<tr>
<td><span>官网</span></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>
<a href="{:U('PayChannel/gameDetail',array_merge(array('id'=>21,'model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
<tr>
<td><span>推广后台</span></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>
<a href="{:U('PayChannel/gameDetail',array_merge(array('id'=>21,'model'=>'coin_pay_order','game_name'=>'推广后台'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
</if>
<tr>
<td><span>汇总</span></td>
<td ><span><if condition="$sumData.pay_amount neq ''">{$sumData['pay_amount']}<else/>0</if></span></td>
@ -225,7 +227,7 @@
{$key}{$payTypeData} &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</if>
</volist>
平台币直充金额<span style="color: red">(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)</span><if condition="$coinSum neq ''">{$coinSum}<else/>0</if>
平台币直充金额<span style="color: red">(2019.12.18号以前的无法对应游戏记录不显示在列表中,此项也不计入充值方式统计)</span><if condition="$coinSum neq ''">{$coinSum}<else/>0</if>
</td>
</tr>
<tr>

@ -35,10 +35,12 @@
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list">
<a class="sch-btn" href="{:U('PayChannel/index')}" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
</div>
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" readonly id="time-start" name="timestart" class="" value="{$startDate}"
placeholder="开始时间"/>

@ -97,11 +97,11 @@
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="pay_way" style="color:#444" class="select_gallery" id="promote_id">
<select id='pay_way' name="pay_way" style="color:#444" class="select_gallery" >
<option value="">支付方式</option>
<option value="0" <?php if (isset($_GET['pay_way']) && $_GET['pay_way'] == 0):?>selected<?php endif;?>>未知</option>
<option value="1" <?php if ($_GET['pay_way'] == 1):?>selected<?php endif;?>>支付宝</option>
<option value="2" <?php if ($_GET['pay_way'] == '2'):?>selected<?php endif;?>>微信</option>
<volist name=":all_pay_way(1)" id="vo">
<option value="{$vo.key}" <?php echo isset($_GET['pay_way']) && $_GET['pay_way'] == $vo['key'] ?'selected':''; ?> >{$vo.value}</option>
</volist>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">

@ -3238,10 +3238,15 @@ class DownloadController extends BaseController {
$roles = M()->alias('record')
->table($subQuery)
->select();
$total = M('spend','tab_')->alias('uc')
->field("$fieldS,$fieldToday as recharge_cost_today")
$total = M('spend', 'tab_')->alias('uc')
->field($fieldS)
->where($map)
->find();
$map['uc.pay_time'] = $spendMap['today.pay_time'];
$total['recharge_cost_today'] = M('spend', 'tab_')->alias('uc')
->field('sum(uc.pay_amount) as recharge_cost_today')
->where($map)
->find()['recharge_cost_today'];
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' :$total['recharge_cost_today'];
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers

@ -1873,9 +1873,14 @@ class QueryController extends BaseController
list($records, $pagination, $count) = $this->paginate($query);
$total = M('spend', 'tab_')->alias('s')
->field("$fieldS, $fieldToday as recharge_cost_today")
->field($fieldS)
->where($map)
->find();
$map['s.pay_time'] = $spendMap['today.pay_time'];
$total['recharge_cost_today'] = M('spend', 'tab_')->alias('s')
->field('sum(s.pay_amount) as recharge_cost_today')
->where($map)
->find()['recharge_cost_today'];
$total['recharge_cost_today'] = empty($total['recharge_cost_today']) ? '0.00' : $total['recharge_cost_today'];
if (!empty($records)) {

Loading…
Cancel
Save