修改 查询 xml

This commit is contained in:
gong
2025-12-20 15:02:14 +08:00
parent 1df39d0d08
commit 7b662ac18a

View File

@@ -17,7 +17,7 @@
left join tb_user_info u on o.user_id = u.id
where 1=1
<if test="shopId != null">
and o.shop_id = #{shopId}
and o.shop_id = #{shopId} and o.status != 'ing'
</if>
<if test="userId != null">
and o.user_id = #{userId}
@@ -53,7 +53,7 @@
SELECT
COUNT(*) AS countNum,
COALESCE(SUM(IF(pay_time IS NOT NULL, IFNULL(final_price, 0), 0)), 0) AS paidAmountTotal,
COALESCE(SUM(IF(status IN ('refunding', 'refund'), IFNULL(o.final_price, 0), 0)), 0) AS refundAmount
COALESCE(SUM(IF(status = 'refund', IFNULL(o.final_price, 0), 0)), 0) AS refundAmount
from pp_package_order o
left join pp_package p on o.package_id = p.id
where o.shop_id = #{shopId}