diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerIntentInfoServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerIntentInfoServiceImpl.java index f4d008098..c1c2060e2 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerIntentInfoServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerIntentInfoServiceImpl.java @@ -160,20 +160,22 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic return intentInfoVO; } HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId); + PartnerIntentInfoVO intentInfoVO = null; if (intentInfoDO != null){ - PartnerIntentInfoVO intentInfoVO = convertPartnerIntentApplyInfoDOToVO(intentInfoDO); - if(StringUtils.isBlank(intentInfoVO.getLiveArea())){ - intentInfoVO.setLiveArea(userInfoVO.getLiveArea()); - } - if(StringUtils.isBlank(intentInfoVO.getWantShopArea())){ - intentInfoVO.setWantShopArea(userInfoVO.getWantShopArea()); - } - if(Objects.isNull(intentInfoVO.getAcceptAdjustType())){ - intentInfoVO.setAcceptAdjustType(userInfoVO.getAcceptAdjustType()); - } - return intentInfoVO; + intentInfoVO = convertPartnerIntentApplyInfoDOToVO(intentInfoDO); + }else { + intentInfoVO = new PartnerIntentInfoVO(); } - return null; + if(StringUtils.isBlank(intentInfoVO.getLiveArea())){ + intentInfoVO.setLiveArea(userInfoVO.getLiveArea()); + } + if(StringUtils.isBlank(intentInfoVO.getWantShopArea())){ + intentInfoVO.setWantShopArea(userInfoVO.getWantShopArea()); + } + if(Objects.isNull(intentInfoVO.getAcceptAdjustType())){ + intentInfoVO.setAcceptAdjustType(userInfoVO.getAcceptAdjustType()); + } + return intentInfoVO; } private void fillIntentInfo(HyPartnerIntentInfoDO intentInfoDO, PartnerIntentInfoRequest request) {