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 1a8f31107..2e622bcea 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -221,12 +221,14 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService return new ResultData(ErrorCode.RENT_CONTRACT_IS_TERMINATED); } } - if (null == record.getMerchantId()) { + if (null == record.getMerchantId() && record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "merchantId不能为空"); } - WxMerchant merchant = wxMerchantMapper.selectByPrimaryKey(record.getMerchantId()); - if (merchant == null) { - return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND); + if (record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { + WxMerchant merchant = wxMerchantMapper.selectByPrimaryKey(record.getMerchantId()); + if (merchant == null) { + return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND); + } } if (null == record.getReceivePeriod()) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "付款周期不能为空");