From 87fb5fde452dd8133123e5368f18a4ffc59f7069 Mon Sep 17 00:00:00 2001 From: wxp01309236 Date: Sun, 25 Jun 2023 17:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/HyPartnerClerkServiceImpl.java | 3 +++ .../impl/HyPartnerIntentInfoServiceImpl.java | 23 ++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerClerkServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerClerkServiceImpl.java index 2ce9c3fba..ae78d625e 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerClerkServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/HyPartnerClerkServiceImpl.java @@ -12,6 +12,7 @@ import com.cool.store.service.HyPartnerClerkService; import com.cool.store.utils.RedisUtilPool; import com.cool.store.utils.StringUtil; import com.cool.store.vo.PartnerClerkVO; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; @@ -29,6 +30,7 @@ import java.util.stream.Collectors; * @Date 2023/6/14 21:37 * @Version 1.0 */ +@Slf4j @Service public class HyPartnerClerkServiceImpl implements HyPartnerClerkService { @@ -57,6 +59,7 @@ public class HyPartnerClerkServiceImpl implements HyPartnerClerkService { @Override public Boolean submitPartnerClerkInfo(PartnerClerkInfoRequest request) { + log.info("HyPartnerClerkServiceImpl#submitPartnerClerkInfo request:{}", JSONObject.toJSONString(request)); String cacheKey = MessageFormat.format(RedisConstant.PARTNER_CLERKINFO_CACHE_KEY, request.getPartnerId(), request.getPartnerLineId()); if(!request.getSubmitFlag()){ // 自动保存时 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 deda24437..4caa7d296 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 @@ -1,12 +1,10 @@ package com.cool.store.service.impl; import com.alibaba.fastjson.JSONObject; -import cn.hutool.core.bean.BeanUtil; import com.cool.store.constants.CommonConstants; import com.cool.store.constants.RedisConstant; import com.cool.store.dao.*; import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO; -import com.cool.store.dto.partner.PrivateSeaLineDTO; import com.cool.store.entity.HyOpenAreaInfoDO; import com.cool.store.entity.HyPartnerIntentInfoDO; import com.cool.store.entity.HyPartnerLineInfoDO; @@ -27,6 +25,7 @@ import com.cool.store.vo.WantShopInfoVO; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.google.common.collect.Lists; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -44,6 +43,7 @@ import java.util.stream.Collectors; * @Date 2023/6/9 15:00 * @Version 1.0 */ +@Slf4j @Service public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoService { @@ -125,6 +125,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic @Override public String submitPartnerIntentInfo(PartnerIntentInfoRequest request) { + log.info("HyPartnerClerkServiceImpl#submitPartnerIntentInfo request:{}", JSONObject.toJSONString(request)); if (StringUtil.isBlank(request.getPartnerId()) || Objects.isNull(request.getPartnerLineId())){ throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); } @@ -159,14 +160,20 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic return intentInfoVO; } HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId); - PartnerIntentInfoVO intentInfoVO = new PartnerIntentInfoVO(); - intentInfoVO.setLiveArea(userInfoVO.getLiveArea()); - intentInfoVO.setWantShopArea(userInfoVO.getWantShopArea()); - intentInfoVO.setAcceptAdjustType(userInfoVO.getAcceptAdjustType()); if (intentInfoDO != null){ - BeanUtil.copyProperties(intentInfoDO, intentInfoVO); + 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; } - return intentInfoVO; + return null; } private void fillIntentInfo(HyPartnerIntentInfoDO intentInfoDO, PartnerIntentInfoRequest request) {