diff --git a/Application/Admin/Model/SpendModel.class.php b/Application/Admin/Model/SpendModel.class.php index 67ccfa30a..90c97f928 100644 --- a/Application/Admin/Model/SpendModel.class.php +++ b/Application/Admin/Model/SpendModel.class.php @@ -861,6 +861,8 @@ SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count,g.sd $query = M("Spend s use index(game_time)","tab_") ->field("game_id") + ->join('LEFT JOIN tab_game as g ON s.game_id=g.id') + ->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id') ->where(['s.pay_status' => 1, 'pay_game_status' => 1]) ->where($map) ->group('s.game_id');