修改 查询 xml
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user