From 47fc8910965f1a8b73f5b2528194f5fccc47dfab Mon Sep 17 00:00:00 2001 From: gongbiao Date: Tue, 27 Nov 2018 13:58:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E7=A9=BA=E9=93=BA=E7=AD=89=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxRentContractServiceImpl.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index cc2b811a6..8bf390867 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -393,11 +393,20 @@ public class WxRentContractServiceImpl implements WxRentContractService { 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)); @@ -469,6 +478,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { WxRentContract wxRentContract = new WxRentContract(); wxRentContract.setTenantId(tenantId); + int allCount = wxRentContractMapper.selectCount(wxRentContract); + resultData.put("allCount", allCount); + //作废合同 wxRentContract.setStatus(EnumRentContractStatus.INVALID.getCode()); wxRentContractMapper.updateRentInvalidStatus(wxRentContract);