| @@ -437,12 +437,18 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | ||||
| WxRentContract wxRentContractQuery = new WxRentContract(); | WxRentContract wxRentContractQuery = new WxRentContract(); | ||||
| wxRentContractQuery.setTenantId(record.getTenantId()); | wxRentContractQuery.setTenantId(record.getTenantId()); | ||||
| wxRentContractQuery.setShopId(rentInfoObject.getLong("shopId")); | |||||
| Long shopId = rentInfoObject.getLong("shopId"); | |||||
| wxRentContractQuery.setShopId(shopId); | |||||
| int count = wxRentContractMapper.selectRentContractCountByShopId(wxRentContractQuery); | int count = wxRentContractMapper.selectRentContractCountByShopId(wxRentContractQuery); | ||||
| if (count > 0) { | if (count > 0) { | ||||
| String shopNumber = rentInfoObject.getString("shopNumber"); | 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 { | } else { | ||||
| WxRentContract wxRentContractQuery = new WxRentContract(); | WxRentContract wxRentContractQuery = new WxRentContract(); | ||||