12.28功能提交

master
zhengyongxing 4 years ago
parent 552a6f8181
commit c716535975

@ -254,7 +254,7 @@ class PlatformController extends ThinkController
"pay_time"=>["between",$yearMap],
"pay_status"=>1
];
$Payamount = M("Spend","tab_")->field("sum(pay_amount) pay_amount,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_amount,FROM_UNIXTIME(`pay_time`, '%Y-%m') paytime")->where($map)->group("paytime")->select();
$Payamount = M("Spend","tab_")->field("sum(IF(is_check=1,pay_amount,0)) pay_amount,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_amount,FROM_UNIXTIME(`pay_time`, '%Y-%m') paytime")->where($map)->group("paytime")->select();
if(empty($Payamount)) return ;
foreach ($Payamount as $v) {
$list[$v['paytime']]['payamount'] = $v['pay_amount'];
@ -1170,7 +1170,7 @@ class PlatformController extends ThinkController
$data = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name,
floor(sum(pay_amount)*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count')
floor(sum(IF(is_check=1,pay_amount,0))*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count')
->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left')
->join("tab_game as g on g.id = s.game_id", 'left')

@ -100,7 +100,7 @@
<tr>
<foreach name="th" item="vo">
<th>注册数</th>
<th>充值流水</th>
<th>充值结算流水</th>
<th>不结算流水</th>
</foreach>
</tr>

Loading…
Cancel
Save