diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 473723699..d7dc0e729 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -69,6 +69,8 @@ public class WxFlowServiceImpl implements WxFlowService { private WxBillRentMapper wxBillRentMapper; @Autowired private WxBillPropertyMapper wxBillPropertyMapper; + @Autowired + private WxMerchantService wxMerchantService; /** * 获取流程key,1合同 2账单 @@ -146,13 +148,16 @@ public class WxFlowServiceImpl implements WxFlowService { wxPropertyContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); wxPropertyContractMapper.updateStatusByRentContractId(wxPropertyContract); - //账单失效 + //物业账单失效 wxBillPropertyMapper.updateInvalidStatusByRent(rent); } - //账单失效 + //租赁账单失效 WxBillRent wxBillRent = new WxBillRent(); wxBillRent.setRentContractId(businessId); wxBillRentMapper.updateInvalidStatus(wxBillRent); + + //解绑商户和商铺关系 + wxMerchantService.disable(wxRentContractMapper.selectByPrimaryKey(businessId).getMerchantId()); } wxRentContractService.updateApplyStatus(rent); }else if(contractType.intValue() == 3 || contractType.intValue() == 4){ diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml index ab5df12d1..b2a365a30 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml @@ -131,7 +131,7 @@ update wx_bill_property set status = 6 where property_contract_id in (select id from wx_property_contract where rent_contract_id = #{id}) - and status = 4 + and status in(4,2) @@ -139,7 +139,10 @@ - update wx_bill_property set receive_pay = #{receivePay} where id = #{id} + update wx_bill_property set updatetime = now() + ,receive_pay = #{receivePay} + ,need_pay = #{needPay} + where id = #{id} diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml index 35911a89a..de4bd528f 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml @@ -126,7 +126,7 @@ update wx_bill_rent set status = 6 where rent_contract_id = #{rentContractId} - and status = 4 + and status in(4,2) @@ -136,6 +136,7 @@ update wx_bill_rent set updatetime = now() ,receive_pay = #{receivePay} + ,need_pay = #{needPay} where id = #{id}