提交意向日志
This commit is contained in:
@@ -29,8 +29,8 @@ public enum OperateTypeEnum {
|
|||||||
REJECT_INTERVIEW("reject_interview", "合作资格面试-拒绝并结束跟进", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REJECT_PUBLIC_REASON,REJECT_REAL_REASON, CERTIFY_FILE)),
|
REJECT_INTERVIEW("reject_interview", "合作资格面试-拒绝并结束跟进", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REJECT_PUBLIC_REASON,REJECT_REAL_REASON, CERTIFY_FILE)),
|
||||||
CREATE_QUALIFYVERIFY("create_qualifyverify", "合作资格面试-创建资格审核", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME,SUMMARY,QUALI_VERIFY_CONTENT)),
|
CREATE_QUALIFYVERIFY("create_qualifyverify", "合作资格面试-创建资格审核", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME,SUMMARY,QUALI_VERIFY_CONTENT)),
|
||||||
USERINFO_UPDATE("userinfo_update", "修改(修改意向信息)", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_USERINFO_UPDATE, AFTER_USERINFO_UPDATE)),
|
USERINFO_UPDATE("userinfo_update", "修改(修改意向信息)", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_USERINFO_UPDATE, AFTER_USERINFO_UPDATE)),
|
||||||
INTENT_INFO_SUBMIT("intent_info_submit", "提交意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
|
INTENT_INFO_SUBMIT("intent_info_submit", "提交意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INTENT_INFO_UPDATE, AFTER_INTENT_INFO_UPDATE)),
|
||||||
INTENT_INFO_UPDATE("intent_info_update", "修改意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
|
INTENT_INFO_UPDATE("intent_info_update", "修改意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, BEFORE_INTENT_INFO_UPDATE, AFTER_INTENT_INFO_UPDATE)),
|
||||||
ADD_TAGS("add_tags", "修改意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
|
ADD_TAGS("add_tags", "修改意向申请书", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME)),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.cool.store.dto.log;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: wxp
|
||||||
|
* @Date: 2023-06-30 10:23
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
public class WantInfoUpdateDTO extends LogBasicDTO{
|
||||||
|
|
||||||
|
private BaseInfoUpdate beforeBaseInfoUpdate;
|
||||||
|
private BaseInfoUpdate afterBaseInfoUpdate;
|
||||||
|
|
||||||
|
private IntentInfoUpdate beforeIntentInfoUpdate;
|
||||||
|
private IntentInfoUpdate afterIntentInfoUpdate;
|
||||||
|
|
||||||
|
private ClerkUpdate beforeClerkUpdate;
|
||||||
|
private ClerkUpdate afterClerkUpdate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class BaseInfoUpdate{
|
||||||
|
private Long id;
|
||||||
|
private String partnerId;
|
||||||
|
private Long partnerLineId;
|
||||||
|
private String mobile;
|
||||||
|
private String username;
|
||||||
|
private Integer sex;
|
||||||
|
private String nation;
|
||||||
|
private Date birthdate;
|
||||||
|
private String idCard;
|
||||||
|
private String idCardPhotoFront;
|
||||||
|
private String idCardPhotoBlack;
|
||||||
|
private String liveAddress;
|
||||||
|
private String userPortrait;
|
||||||
|
private Integer status;
|
||||||
|
private String latestLogMessage;
|
||||||
|
private String passReason;
|
||||||
|
private String certifyFile;
|
||||||
|
private Date passTime;
|
||||||
|
private String passUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class IntentInfoUpdate{
|
||||||
|
private Long id;
|
||||||
|
private String partnerId;
|
||||||
|
private Long partnerLineId;
|
||||||
|
private String liveArea;
|
||||||
|
private String wantShopArea;
|
||||||
|
private Integer acceptAdjustType;
|
||||||
|
private Integer isHaveWantShop;
|
||||||
|
private String wantShopInfo;
|
||||||
|
private String maxBudget;
|
||||||
|
private String moneySource;
|
||||||
|
private String moneyProve;
|
||||||
|
private String education;
|
||||||
|
private String workYear;
|
||||||
|
private Integer isHaveWorkExp;
|
||||||
|
private String workExp;
|
||||||
|
private Integer isConsumer;
|
||||||
|
private String otherBand;
|
||||||
|
private String brandStrength;
|
||||||
|
private String needImprove;
|
||||||
|
private String strength;
|
||||||
|
private String weakness;
|
||||||
|
private String passCause;
|
||||||
|
private Date passTime;
|
||||||
|
private String passUser;
|
||||||
|
private String passCertifyFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class ClerkUpdate{
|
||||||
|
private Long id;
|
||||||
|
private Long partnerLineId;
|
||||||
|
private String partnerId;
|
||||||
|
private String username;
|
||||||
|
private String relationship;
|
||||||
|
private Integer age;
|
||||||
|
private String chooseReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,10 +6,12 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
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.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.LineLogInfo;
|
import com.cool.store.dto.log.LineLogInfo;
|
||||||
import com.cool.store.dto.log.UserInfoUpdateDTO;
|
import com.cool.store.dto.log.UserInfoUpdateDTO;
|
||||||
|
import com.cool.store.dto.log.WantInfoUpdateDTO;
|
||||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
||||||
@@ -38,6 +40,7 @@ import com.google.common.collect.Lists;
|
|||||||
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;
|
||||||
@@ -72,6 +75,8 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
HyPhoneLocationService hyPhoneLocationService;
|
HyPhoneLocationService hyPhoneLocationService;
|
||||||
@Resource
|
@Resource
|
||||||
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
||||||
|
@Autowired
|
||||||
|
private LogService logService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber) {
|
public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber) {
|
||||||
@@ -186,14 +191,20 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
WantInfoUpdateDTO.IntentInfoUpdate beforeIntentInfoUpdate = new WantInfoUpdateDTO.IntentInfoUpdate();
|
||||||
|
WantInfoUpdateDTO.IntentInfoUpdate afterIntentInfoUpdate = new WantInfoUpdateDTO.IntentInfoUpdate();
|
||||||
|
|
||||||
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||||
if(intentInfoDO == null){
|
if(intentInfoDO == null){
|
||||||
intentInfoDO = new HyPartnerIntentInfoDO();
|
intentInfoDO = new HyPartnerIntentInfoDO();
|
||||||
fillIntentInfo(intentInfoDO, request);
|
fillIntentInfo(intentInfoDO, request);
|
||||||
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
|
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
|
||||||
|
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
|
||||||
}else {
|
}else {
|
||||||
|
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
|
||||||
fillIntentInfo(intentInfoDO, request);
|
fillIntentInfo(intentInfoDO, request);
|
||||||
hyPartnerIntentInfoDAO.updateByPrimaryKeySelective(intentInfoDO);
|
hyPartnerIntentInfoDAO.updateByPrimaryKeySelective(intentInfoDO);
|
||||||
|
BeanUtil.copyProperties(intentInfoDO, afterIntentInfoUpdate);
|
||||||
}
|
}
|
||||||
redisUtilPool.delKey(cacheKey);
|
redisUtilPool.delKey(cacheKey);
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(request.getPartnerId());
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(request.getPartnerId());
|
||||||
@@ -215,6 +226,12 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
|||||||
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//记录日志
|
||||||
|
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))
|
||||||
|
.beforeIntentInfoUpdate(beforeIntentInfoUpdate).afterIntentInfoUpdate(afterIntentInfoUpdate).build();
|
||||||
|
logService.recordPartnerBizLog(operator,hyPartnerLineInfoDO.getId(), OperateTypeEnum.INTENT_INFO_UPDATE,log);
|
||||||
return hyPartnerLineInfoDO.getLineStatus();
|
return hyPartnerLineInfoDO.getLineStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user