From 0e1851e8e079d0f4bbea4634b3e2b4693678745e Mon Sep 17 00:00:00 2001 From: gongbiao Date: Tue, 13 Nov 2018 17:47:51 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=89=A9=E4=B8=9A=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E7=A7=9F=E8=B5=81=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E7=9A=84=E6=96=B0=E5=BA=97=E9=93=BA=EF=BC=8C=E7=89=A9=E4=B8=9A?= =?UTF-8?q?=E6=9C=AA=E7=BB=88=E6=AD=A2=E6=AD=A4=E5=BA=97=E9=93=BA=E6=97=B6?= =?UTF-8?q?=E6=8F=90=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxPropertyContractServiceImpl.java | 16 +++++++++++----- .../src/main/resources/mapper/WxShopMapper.xml | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index f95673793..f0a8e0f2d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -466,11 +466,17 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService WxRentContract wxRentContract = wxRentContractMapper.selectByPrimaryKey(rentContractId); if (wxRentContract != null) { - if (wxRentContract.getStatus().equals(EnumRentContractStatus.CONTRACT_END.getCode()) || - wxRentContract.getStatus().equals(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()) || - wxRentContract.getStatus().equals(EnumRentContractStatus.WAIT_SIGN.getCode()) || - wxRentContract.getStatus().equals(EnumRentContractStatus.INVALID.getCode())) { - return new ResultData(true); + WxPropertyContract wxPropertyContract = new WxPropertyContract(); + wxPropertyContract.setTenantId(wxRentContract.getTenantId()); + wxPropertyContract.setShopId(wxRentContract.getShopId()); + List select = wxPropertyContractMapper.select(wxPropertyContract); + if (select.size() > 0) { + long count = select.stream().filter(propertyContract -> propertyContract.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) || + propertyContract.getStatus().equals(EnumRentContractStatus.RENT_PAID.getCode()) || + propertyContract.getStatus().equals(EnumRentContractStatus.CONTRACT_END_SOON.getCode())).count(); + if (count > 0) { + return new ResultData(true); + } } } return new ResultData(false); diff --git a/mallinkService/src/main/resources/mapper/WxShopMapper.xml b/mallinkService/src/main/resources/mapper/WxShopMapper.xml index 5d9520f13..e6f90c8d6 100644 --- a/mallinkService/src/main/resources/mapper/WxShopMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxShopMapper.xml @@ -262,7 +262,7 @@ and s.id not in( - SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status!=1 and status!=6 and status!=7 and merchant_id is not null + SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status!=1 and status!=5 and status!=6 and status!=7 and merchant_id is not null ) order by s.${sortColumns}