|
|
|
@ -208,12 +208,11 @@ class SettlementController extends ThinkController
|
|
|
|
|
g.relation_game_name, g.relation_game_id, sum(s.pay_amount) as amount
|
|
|
|
|
from
|
|
|
|
|
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
|
|
|
|
|
where s.pay_status = 1 and s.pay_time BETWEEN {$time_start} and {$time_end}
|
|
|
|
|
group by g.relation_game_id
|
|
|
|
|
");
|
|
|
|
|
|
|
|
|
|
if ($res) {
|
|
|
|
|
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
|
|
|
|
|
from
|
|
|
|
|
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
|
|
|
|
|
where s.pay_status = 1 and s.pay_time BETWEEN {$time_start} and {$time_end}
|
|
|
|
|
group by g.relation_game_id
|
|
|
|
|