@ -334,8 +334,8 @@ class ConsoleController extends Think {
->join('tab_partner p on pdw.partner_id = p.id')
->join('tab_game g on pdw.partner_id = g.partner_id')
->join('tab_cp_game_ratio cgr on cgr.game_id = g.id and begin_total_amount = 0 and is_del = 0')
->join('tab_spend s on s.game_id = g.id')
->where(['pdw.status'=>1, 's.pay_status'=>1])
->join('tab_game_data s on s.game_id = g.id')
->where(['pdw.status'=>1])
->group('pdw.id')
->select();
if (!$warns) return;
@ -903,7 +903,7 @@ class GameController extends ThinkController
$count = M('partner_divide_warn', 'tab_')->alias('pdw')->join("tab_game g on pdw.partner_id = g.partner_id", 'left')->group('pdw.id')->where($map)->count();
if (!empty($list)) {
foreach ($list as &$item) {
$item['total_amount'] = M('spend', 'tab_')->where(['pay_status'=>1, 'game_id'=>['in',explode(',', $item['game_id'])]])->sum('pay_amount');
$item['total_amount'] = M('game_data', 'tab_')->where(['game_id'=>['in',explode(',', $item['game_id'])]])->sum('pay_amount');
}
$page = set_pagination($count, $row);