12.28功能提交

master
zhengyongxing 4 years ago
parent d1b0ec55a8
commit f855835501

@ -1186,9 +1186,9 @@ class PlatformController extends ThinkController
} }
$tdata = M('promote', 'tab_')->alias('tp1') $tdata = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name, ->field('tp1.account as promote_account,tp1.id,g.relation_game_id,g.relation_game_name,
floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today, floor(sum(IF(s.pay_time ' . $today . ' and is_check=1,pay_amount,0))*100) as today,
floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week, floor(sum(IF(s.pay_time ' . $week . ' and is_check=1,pay_amount,0))*100) as week,
floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') floor(sum(IF(s.pay_time ' . $mounth . ' and is_check=1,pay_amount,0))*100) as mounth')
->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
->join("tab_spend as s on tp2.id = s.promote_id", 'left') ->join("tab_spend as s on tp2.id = s.promote_id", 'left')
->join("tab_game as g on g.id = s.game_id", 'left') ->join("tab_game as g on g.id = s.game_id", 'left')
@ -1243,14 +1243,14 @@ class PlatformController extends ThinkController
if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) {
//官方渠道数据添加 //官方渠道数据添加
$authorityData = M('spend', 'tab_')->alias('s') $authorityData = M('spend', 'tab_')->alias('s')
->field('floor(sum(pay_amount)*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count') ->field('floor(sum(IF(is_check=1,pay_amount,0))*100) as count,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_count')
->where($map) ->where($map)
->find(); ->find();
$tauthorityData = M('spend', 'tab_')->alias('s') $tauthorityData = M('spend', 'tab_')->alias('s')
->field(' ->field('
floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today, floor(sum(IF(s.pay_time ' . $today . ' and is_check=1,pay_amount,0))*100) as today,
floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week, floor(sum(IF(s.pay_time ' . $week . ' and is_check=1,pay_amount,0))*100) as week,
floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') floor(sum(IF(s.pay_time ' . $mounth . ' and is_check=1,pay_amount,0))*100) as mounth')
->where($tmap) ->where($tmap)
->find(); ->find();
$authorityData['today'] = $tauthorityData['today']; $authorityData['today'] = $tauthorityData['today'];

Loading…
Cancel
Save