From 6e4d22bd67a3128c0abc95a31b241a5a2ba79751 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 11 Apr 2019 15:53:56 +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][=E5=88=A4=E6=96=AD=E5=95=86=E9=93=BA?= =?UTF-8?q?=E5=B7=B2=E5=87=BA=E7=A7=9F=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxRentContractServiceImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 49928084f..fe09dc689 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -437,12 +437,18 @@ public class WxRentContractServiceImpl implements WxRentContractService { JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); WxRentContract wxRentContractQuery = new WxRentContract(); wxRentContractQuery.setTenantId(record.getTenantId()); - wxRentContractQuery.setShopId(rentInfoObject.getLong("shopId")); + Long shopId = rentInfoObject.getLong("shopId"); + wxRentContractQuery.setShopId(shopId); int count = wxRentContractMapper.selectRentContractCountByShopId(wxRentContractQuery); if (count > 0) { String shopNumber = rentInfoObject.getString("shopNumber"); - return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + shopNumber + " 已出租"); + return new ResultData(ErrorCode.SHOP_IS_RENT, "店铺 " + shopNumber + " 已出租"); + } + WxShop wxShop = wxShopMapper.selectByPrimaryKey(shopId); + if (wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) { + return new ResultData(ErrorCode.SHOP_IS_RENT, "店铺 " + wxShop.getShopNumber() + " 已出租"); } + } } else { WxRentContract wxRentContractQuery = new WxRentContract();