master
yulingwei 5 years ago
parent 35b267027c
commit 40ddeae55a

@ -873,8 +873,8 @@ class GameController extends ThinkController
->alias('pdw')->field("pdw.*, p.partner, sum(s.pay_amount) as total_amount, group_concat(distinct(g.relation_game_name)) as game_name")
->join("tab_partner p on p.id = pdw.partner_id")
->join("tab_game g on pdw.partner_id = g.partner_id", 'left')
->join('tab_spend s on s.game_id = g.id', 'left')
->where(array_merge($map, ['s.pay_status'=>1]))
->join('tab_spend s on s.game_id = g.id and s.pay_status = 1', 'left')
->where($map)
->group('pdw.id, p.partner')
->page($p, $row)->select();
$count = M('partner_divide_warn', 'tab_')->alias('pdw')->join("tab_game g on pdw.partner_id = g.partner_id", 'left')->where($map)->count();

Loading…
Cancel
Save