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 0ec077190..310218e9a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -483,9 +483,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { WxRentContract wxRentContractQuery = new WxRentContract(); wxRentContractQuery.setTenantId(record.getTenantId()); Long shopId = rentInfoObject.getLong("shopId"); + String shopNumber = rentInfoObject.getString("shopNumber"); + if (shopId == null) { + return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除"); + } wxRentContractQuery.setShopId(shopId); int count = wxRentContractMapper.selectRentContractCountByShopId(wxRentContractQuery); - String shopNumber = rentInfoObject.getString("shopNumber"); if (count > 0) { return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + shopNumber + " 已出租"); }