Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -6,10 +6,12 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.log.AddTagsDTO;
|
import com.cool.store.dto.log.AddTagsDTO;
|
||||||
import com.cool.store.dto.log.BlackListLogDTO;
|
import com.cool.store.dto.log.BlackListLogDTO;
|
||||||
import com.cool.store.dto.log.LineLogInfo;
|
import com.cool.store.dto.log.LineLogInfo;
|
||||||
|
import com.cool.store.dto.log.WantInfoUpdateDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
@@ -19,6 +21,7 @@ import com.cool.store.request.PartnerBaseInfoRequest;
|
|||||||
import com.cool.store.service.HyPartnerBaseInfoService;
|
import com.cool.store.service.HyPartnerBaseInfoService;
|
||||||
import com.cool.store.service.HyPartnerLineInfoService;
|
import com.cool.store.service.HyPartnerLineInfoService;
|
||||||
import com.cool.store.service.HyPhoneLocationService;
|
import com.cool.store.service.HyPhoneLocationService;
|
||||||
|
import com.cool.store.service.LogService;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.vo.PartnerBaseInfoVO;
|
import com.cool.store.vo.PartnerBaseInfoVO;
|
||||||
@@ -26,6 +29,7 @@ import com.cool.store.vo.PartnerUserInfoVO;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -76,6 +80,9 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
|||||||
@Resource
|
@Resource
|
||||||
HyPartnerCertificationInfoMapper hyPartnerCertificationInfoMapper;
|
HyPartnerCertificationInfoMapper hyPartnerCertificationInfoMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LogService logService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean addTags(LoginUserInfo user, AddTagsRequest addTagsRequest) {
|
public Boolean addTags(LoginUserInfo user, AddTagsRequest addTagsRequest) {
|
||||||
@@ -115,14 +122,20 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
|||||||
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
WantInfoUpdateDTO.BaseInfoUpdate beforeBaseInfoUpdate = new WantInfoUpdateDTO.BaseInfoUpdate();
|
||||||
|
WantInfoUpdateDTO.BaseInfoUpdate afterBaseInfoUpdate = new WantInfoUpdateDTO.BaseInfoUpdate();
|
||||||
|
|
||||||
HyPartnerBaseInfoDO baseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
HyPartnerBaseInfoDO baseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||||
if(baseInfoDO == null){
|
if(baseInfoDO == null){
|
||||||
baseInfoDO = new HyPartnerBaseInfoDO();
|
baseInfoDO = new HyPartnerBaseInfoDO();
|
||||||
fillBaseInfo(baseInfoDO, request);
|
fillBaseInfo(baseInfoDO, request);
|
||||||
hyPartnerBaseInfoDAO.insertSelective(baseInfoDO);
|
hyPartnerBaseInfoDAO.insertSelective(baseInfoDO);
|
||||||
|
BeanUtil.copyProperties(baseInfoDO, afterBaseInfoUpdate);
|
||||||
}else {
|
}else {
|
||||||
|
BeanUtil.copyProperties(baseInfoDO, beforeBaseInfoUpdate);
|
||||||
fillBaseInfo(baseInfoDO, request);
|
fillBaseInfo(baseInfoDO, request);
|
||||||
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(baseInfoDO);
|
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(baseInfoDO);
|
||||||
|
BeanUtil.copyProperties(baseInfoDO, afterBaseInfoUpdate);
|
||||||
}
|
}
|
||||||
if(request.getSubmitFlag()){
|
if(request.getSubmitFlag()){
|
||||||
// 更新线索表状态
|
// 更新线索表状态
|
||||||
@@ -146,6 +159,12 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
|||||||
}
|
}
|
||||||
// 清空暂存信息
|
// 清空暂存信息
|
||||||
redisUtilPool.delKey(cacheKey);
|
redisUtilPool.delKey(cacheKey);
|
||||||
|
//记录日志
|
||||||
|
PartnerUserInfoVO operator = PartnerUserHolder.getUser();
|
||||||
|
WantInfoUpdateDTO log = WantInfoUpdateDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername())
|
||||||
|
.operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
|
||||||
|
.beforeBaseInfoUpdate(beforeBaseInfoUpdate).afterBaseInfoUpdate(afterBaseInfoUpdate).build();
|
||||||
|
logService.recordPartnerBizLog(operator, baseInfoDO.getPartnerLineId(), OperateTypeEnum.INTENT_INFO_UPDATE,log);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
intentInfoDO = new HyPartnerIntentInfoDO();
|
intentInfoDO = new HyPartnerIntentInfoDO();
|
||||||
fillIntentInfo(intentInfoDO, request);
|
fillIntentInfo(intentInfoDO, request);
|
||||||
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
|
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
|
||||||
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
|
BeanUtil.copyProperties(intentInfoDO, afterIntentInfoUpdate);
|
||||||
}else {
|
}else {
|
||||||
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
|
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
|
||||||
fillIntentInfo(intentInfoDO, request);
|
fillIntentInfo(intentInfoDO, request);
|
||||||
|
|||||||
Reference in New Issue
Block a user