From 12e2eb9ba1b0fbfa71a8cf1bfaf3d2d3fa496258 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sat, 15 Jun 2019 16:09:51 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E7=89=A9=E4=B8=9A=E5=90=88?= =?UTF-8?q?=E5=90=8C][=E4=BF=AE=E6=94=B9][=E7=89=A9=E4=B8=9A=E4=BF=9D?= =?UTF-8?q?=E5=AD=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxPropertyContractServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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(), "付款周期不能为空");