优化
This commit is contained in:
@@ -12,6 +12,7 @@ import com.cool.store.service.HyPartnerClerkService;
|
|||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.vo.PartnerClerkVO;
|
import com.cool.store.vo.PartnerClerkVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.collections4.ListUtils;
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -29,6 +30,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Date 2023/6/14 21:37
|
* @Date 2023/6/14 21:37
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class HyPartnerClerkServiceImpl implements HyPartnerClerkService {
|
public class HyPartnerClerkServiceImpl implements HyPartnerClerkService {
|
||||||
|
|
||||||
@@ -57,6 +59,7 @@ public class HyPartnerClerkServiceImpl implements HyPartnerClerkService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean submitPartnerClerkInfo(PartnerClerkInfoRequest request) {
|
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());
|
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_CLERKINFO_CACHE_KEY, request.getPartnerId(), request.getPartnerLineId());
|
||||||
if(!request.getSubmitFlag()){
|
if(!request.getSubmitFlag()){
|
||||||
// 自动保存时
|
// 自动保存时
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
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.HyOpenAreaInfoDO;
|
||||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
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.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -44,6 +43,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Date 2023/6/9 15:00
|
* @Date 2023/6/9 15:00
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoService {
|
public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoService {
|
||||||
|
|
||||||
@@ -125,6 +125,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String submitPartnerIntentInfo(PartnerIntentInfoRequest request) {
|
public String submitPartnerIntentInfo(PartnerIntentInfoRequest request) {
|
||||||
|
log.info("HyPartnerClerkServiceImpl#submitPartnerIntentInfo request:{}", JSONObject.toJSONString(request));
|
||||||
if (StringUtil.isBlank(request.getPartnerId()) || Objects.isNull(request.getPartnerLineId())){
|
if (StringUtil.isBlank(request.getPartnerId()) || Objects.isNull(request.getPartnerLineId())){
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
@@ -159,14 +160,20 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
return intentInfoVO;
|
return intentInfoVO;
|
||||||
}
|
}
|
||||||
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId);
|
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){
|
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) {
|
private void fillIntentInfo(HyPartnerIntentInfoDO intentInfoDO, PartnerIntentInfoRequest request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user