清空老线索信息

This commit is contained in:
wxp01309236
2023-07-04 20:30:47 +08:00
parent 73acf87414
commit 92cc7bbad6
4 changed files with 52 additions and 8 deletions

View File

@@ -189,14 +189,12 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
HyPartnerLineInfoDO newLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
Long newLindId = newLineInfo.getId();
String newPartnerId = newLineInfo.getPartnerId();
BeanUtil.copyProperties(oldLineInfo,newLineInfo);
BeanUtil.copyProperties(oldLineInfo,newLineInfo,"createTime","updateTime","id","deleted");
newLineInfo.setId(newLindId);
newLineInfo.setPartnerId(newPartnerId);
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(newLineInfo);
oldLineInfo.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
oldLineInfo.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
oldLineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(oldLineInfo);
cleanOldLineInfo(oldLineInfo);
hyPartnerLineInfoDAO.updateByPrimaryKey(oldLineInfo);
// 新线索绑定身份证号
HyPartnerBaseInfoDO newBaseInfo = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(currentUser.getPartnerId(), lineId);
fillBaseInfoIdCard(newBaseInfo, oldBaseInfo.getIdCard(), oldBaseInfo.getIdCardPhotoFront(), oldBaseInfo.getIdCardPhotoBlack(), oldBaseInfo.getUsername(),
@@ -231,6 +229,25 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
return true;
}
private void cleanOldLineInfo(HyPartnerLineInfoDO oldLineInfo) {
oldLineInfo.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
oldLineInfo.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
oldLineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
oldLineInfo.setInvestmentManager(null);
oldLineInfo.setDevelopmentDirector(null);
oldLineInfo.setDevelopmentManager(null);
oldLineInfo.setDeadline(null);
oldLineInfo.setPassReason(null);
oldLineInfo.setRejectPublicReason(null);
oldLineInfo.setRejectRealReason(null);
oldLineInfo.setCertifyFile(null);
oldLineInfo.setCloseTime(null);
oldLineInfo.setCloseUserId(null);
oldLineInfo.setJoinBlackReason(null);
oldLineInfo.setRemoveBlackReason(null);
oldLineInfo.setUserChannelId(null);
}
@Override
public HyPartnerBaseInfoDO generateBaseInfo(HyPartnerUserInfoDO hyPartnerUserInfoDO, Long partnerLineId, String userPortrait) {
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(hyPartnerUserInfoDO.getPartnerId(), partnerLineId);