|
@@ -18,12 +18,12 @@
|
|
|
SELECT
|
|
|
DATE(create_time) AS date,
|
|
|
sum(consumption_points) AS conut
|
|
|
- FROM distri_consumption_top_up_log GROUP BY date(create_time)
|
|
|
+ FROM distri_consumption_top_up_log where deleted = 0 GROUP BY date(create_time)
|
|
|
UNION ALL
|
|
|
SELECT
|
|
|
DATE(create_time) AS create_time,
|
|
|
sum(top_up_consumption_points) AS conut
|
|
|
- FROM distri_user_top_up_consumption_points_order GROUP BY date(create_time)
|
|
|
+ FROM distri_user_top_up_consumption_points_order where deleted = 0 and pay_status = 1 GROUP BY date(create_time)
|
|
|
) AS combined
|
|
|
GROUP BY DATE(combined.date)
|
|
|
HAVING SUM(combined.conut) > 0
|
|
@@ -37,11 +37,11 @@
|
|
|
(SELECT
|
|
|
consumption_points
|
|
|
FROM
|
|
|
- distri_consumption_top_up_log
|
|
|
+ distri_consumption_top_up_log where deleted = 0
|
|
|
UNION ALL
|
|
|
SELECT
|
|
|
top_up_consumption_points AS consumption_points
|
|
|
FROM
|
|
|
- distri_user_top_up_consumption_points_order) AS combined;
|
|
|
+ distri_user_top_up_consumption_points_order where deleted = 0 and pay_status = 1) AS combined;
|
|
|
</select>
|
|
|
</mapper>
|