From 834f88ddc4d62899e6dd4507bacbdd8715045412 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 30 Nov 2018 01:06:14 +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][=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxPropertyContractServiceImpl.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 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 333897dca..c5ec3dbdd 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -393,11 +393,20 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService Map resultData = new HashMap(); //商铺信息 - Map shopparams = new HashMap<>(); - shopparams.put("tenantId", tenantId); - shopparams.put("status", EnumShopStatus.NOT_RENT.getCode()); - Map shopLeftInfo = wxShopMapper.queryShopLeftInfo(shopparams); - resultData.put("shopLeftInfo", shopLeftInfo); + WxShop wxShop = new WxShop(); + wxShop.setTenantId(tenantId); + wxShop.setStatus(EnumShopStatus.RENT.getCode()); + List rentedList = wxShopMapper.findList(wxShop); + wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); + List unrentedList = wxShopMapper.findList(wxShop); + + HashMap shopMap = new HashMap<>(3); + int rentedCount = rentedList.size(); + int unrentedCount = unrentedList.size(); + shopMap.put("rentedCount",rentedCount); + shopMap.put("unrentedCount",unrentedCount); + shopMap.put("allCount",rentedCount+unrentedCount); + resultData.put("shopCountInfo", shopMap); //需要更新的状态 resultData.putAll(updateStatus(tenantId)); @@ -480,6 +489,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService WxPropertyContract wxRentContract = new WxPropertyContract(); wxRentContract.setTenantId(tenantId); + + int allCount = wxPropertyContractMapper.selectCount(wxRentContract); + resultData.put("allCount", allCount); + //作废合同 wxRentContract.setStatus(EnumRentContractStatus.INVALID.getCode()); wxPropertyContractMapper.updateRentInvalidStatus(wxRentContract);