From 35c767716257a1717f0980f07533932e596f83c7 Mon Sep 17 00:00:00 2001 From: winter Date: Thu, 22 Aug 2024 20:48:03 +0800 Subject: [PATCH] fix --- .../src/main/resources/mapper/WxAllBillMapper.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml b/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml index 26c66bb36..ee35acba1 100644 --- a/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxAllBillMapper.xml @@ -111,7 +111,7 @@ and ( ( `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') < 0 and bill_type not in (13,21,5)) or - ( `receive_pay` - `pay` - IFNULL(`set_off`,'0') < 0 and bill_type in (13,21,5)) + ( `pay` - IFNULL(`return_pay`,'0') > 0 and bill_type in (13,21,5)) ) @@ -289,7 +289,8 @@ - delete from wx_all_bill where starttime >= #{shopEndtime} and IFNULL(`pay`,'0') <= 0 AND IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 + delete from wx_all_bill where starttime >= #{shopEndtime} and IFNULL(`pay`,'0') <= 0 AND IFNULL(`set_off`,'0') <= 0 + and IFNULL(`return_pay`,'0') <= 0 and IFNULL(`use_money`,'0') <= 0 and rent_contract_id = #{rentContractId} @@ -304,13 +305,13 @@ delete from wx_all_bill where rent_contract_id = #{rentContractId} - and IFNULL(`pay`,'0') <= 0 AND IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 + and IFNULL(`pay`,'0') <= 0 AND IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 and IFNULL(`use_money`,'0') <= 0 and extra_create_from = #{extraCreateFrom} and `starttime` = #{starttimeEqual} delete from wx_all_bill where extra_create_from = #{extraCreateFrom} - and IFNULL(`pay`,'0') <= 0 AND IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 + and IFNULL(`pay`,'0') <= 0 AND IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 and IFNULL(`use_money`,'0') <= 0 and `starttime` = #{starttimeEqual} and rent_contract_id = #{rentContractId} @@ -353,7 +354,8 @@ - delete from wx_all_bill where energy_reading_calcuteId = #{energyReadingCalcuteId} and tenant_id = #{tenantId} and pay <= 0 and IFNULL(`set_off`,'0') <= 0 and IFNULL(`return_pay`,'0') <= 0 + delete from wx_all_bill where energy_reading_calcuteId = #{energyReadingCalcuteId} 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