|
@@ -319,11 +319,13 @@
|
|
AND i2.user_id = #{userId}
|
|
AND i2.user_id = #{userId}
|
|
GROUP BY i1.account_id
|
|
GROUP BY i1.account_id
|
|
) t4 ON t2.account_id = t4.account_id
|
|
) t4 ON t2.account_id = t4.account_id
|
|
- LEFT JOIN ctop_kuaishou_account_balance_budget t6 ON t6.account_id = t2.account_id
|
|
|
|
|
|
+ LEFT JOIN (
|
|
|
|
+ select account_id,balance,day_budget from ctop_kuaishou_account_balance_budget
|
|
|
|
+ where state =1
|
|
|
|
+ ) t6 ON t6.account_id = t2.account_id
|
|
where stat_date >= #{startTime}
|
|
where stat_date >= #{startTime}
|
|
AND stat_date <= #{endTime}
|
|
AND stat_date <= #{endTime}
|
|
AND t2.user_id = #{userId}
|
|
AND t2.user_id = #{userId}
|
|
- AND t6.state = 1
|
|
|
|
GROUP BY t2.account_id
|
|
GROUP BY t2.account_id
|
|
<if test="sortCode != '' and sortCode != null ">
|
|
<if test="sortCode != '' and sortCode != null ">
|
|
ORDER BY ${sortCode}
|
|
ORDER BY ${sortCode}
|
|
@@ -389,10 +391,12 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
) t5 ON t2.user_id = t5.id
|
|
) t5 ON t2.user_id = t5.id
|
|
- LEFT JOIN ctop_kuaishou_account_balance_budget t6 ON t6.account_id = t2.account_id
|
|
|
|
|
|
+ LEFT JOIN (
|
|
|
|
+ select account_id,balance,day_budget from ctop_kuaishou_account_balance_budget
|
|
|
|
+ where state =1
|
|
|
|
+ ) t6 ON t6.account_id = t2.account_id
|
|
where stat_date >= #{startTime}
|
|
where stat_date >= #{startTime}
|
|
AND stat_date <= #{endTime}
|
|
AND stat_date <= #{endTime}
|
|
- AND t6.state = 1
|
|
|
|
and t2.account_status = 0
|
|
and t2.account_status = 0
|
|
<if test="userIds != null">
|
|
<if test="userIds != null">
|
|
AND t2.user_id IN
|
|
AND t2.user_id IN
|