From ed00ce5e02f4cf3647076765e2e3babc3c38b2a6 Mon Sep 17 00:00:00 2001 From: luozukai Date: Thu, 28 Feb 2019 11:28:34 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=93=9C=E9=94=A3=E6=B9=BE][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E5=A4=B1=E6=95=88=E8=B4=A6=E5=8D=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxFlowServiceImpl.java | 9 +++++++-- .../src/main/resources/mapper/WxBillPropertyMapper.xml | 7 +++++-- .../src/main/resources/mapper/WxBillRentMapper.xml | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) 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}