master
yulingwei 5 years ago
parent 5468239cf3
commit c59aeaa9d3

@ -208,12 +208,11 @@ class SettlementController extends ThinkController
g.relation_game_name, g.relation_game_id, sum(s.pay_amount) as amount g.relation_game_name, g.relation_game_id, sum(s.pay_amount) as amount
from from
tab_spend s tab_spend s
inner join tab_promote p on p.chain like '/{$item['id']}/%' and s.promote_id = p.id inner join tab_promote p on (p.chain like '/{$item['id']}/%' or p.id = {$item['id']}) and s.promote_id = p.id
inner join tab_game g on s.game_id = g.id inner join tab_game g on s.game_id = g.id
where s.pay_status = 1 and s.pay_time BETWEEN {$time_start} and {$time_end} where s.pay_status = 1 and s.pay_time BETWEEN {$time_start} and {$time_end}
group by g.relation_game_id group by g.relation_game_id
"); ");
if ($res) { if ($res) {
if (!isset($list[$item['p_id']])) { if (!isset($list[$item['p_id']])) {
// 奖罚金额 // 奖罚金额
@ -281,7 +280,7 @@ class SettlementController extends ThinkController
g.relation_game_name, g.relation_game_id, sum(s.pay_amount) as amount g.relation_game_name, g.relation_game_id, sum(s.pay_amount) as amount
from from
tab_spend s tab_spend s
inner join tab_promote p on p.chain like '/{$item['id']}/%' and s.promote_id = p.id inner join tab_promote p on (p.chain like '/{$item['id']}/%' or p.id = {$item['id']}) and s.promote_id = p.id
inner join tab_game g on s.game_id = g.id inner join tab_game g on s.game_id = g.id
where s.pay_status = 1 and s.pay_time BETWEEN {$time_start} and {$time_end} where s.pay_status = 1 and s.pay_time BETWEEN {$time_start} and {$time_end}
group by g.relation_game_id group by g.relation_game_id

Loading…
Cancel
Save