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}