From d135d033fdb2724bd437efd8ab741bc50a1a566a Mon Sep 17 00:00:00 2001 From: winter <664946893@qq.com> Date: Sat, 30 Nov 2024 17:27:13 +0800 Subject: [PATCH] fix --- .../src/main/resources/mapper/WxAllBillMapper.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml b/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml index d8ec0dcf5..069278cf0 100644 --- a/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml @@ -432,7 +432,11 @@ delete from wx_all_bill where id = #{id} and tenant_id = #{tenantId} - and pay <= 0 and IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 and IFNULL(`use_money`,'0') <= 0 + and ( + (bill_type != 7 and pay <= 0 and IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 and IFNULL(`use_money`,'0') <= 0) + or + (bill_type = 7 and IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 and IFNULL(`use_money`,'0') <= 0) + )