Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

This commit is contained in:
zhangchenbiao
2023-07-04 16:49:58 +08:00
15 changed files with 115 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
@Repository
public class HyInterviewDAO {
@@ -46,4 +47,11 @@ public class HyInterviewDAO {
}
public int updateLineId(Long newLineId,Long oldLineId){
if (newLineId==null || Objects.isNull(oldLineId)){
return 0;
}
return interviewMapper.updateLineId(newLineId, oldLineId);
}
}

View File

@@ -55,4 +55,11 @@ public class HyPartnerClerkDAO {
return hyPartnerClerkMapper.listByPartnerIdAndLineId(partnerId, partnerLineId);
}
public int updateLineId(Long newLineId,Long oldLineId){
if (newLineId==null || Objects.isNull(oldLineId)){
return 0;
}
return hyPartnerClerkMapper.updateLineId(newLineId, oldLineId);
}
}

View File

@@ -62,5 +62,11 @@ public class HyPartnerIntentInfoDAO {
return hyPartnerIntentInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
}
public int updateLineId(Long newLineId,Long oldLineId){
if (newLineId==null || Objects.isNull(oldLineId)){
return 0;
}
return hyPartnerIntentInfoMapper.updateLineId(newLineId, oldLineId);
}
}

View File

@@ -16,6 +16,7 @@ import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* @Author suzhuhong
@@ -105,4 +106,10 @@ public class HyPartnerInterviewPlanDAO {
}
public int updateLineId(Long newLineId,Long oldLineId){
if (newLineId==null || Objects.isNull(oldLineId)){
return 0;
}
return hyPartnerInterviewPlanMapper.updateLineId(newLineId, oldLineId);
}
}

View File

@@ -39,4 +39,7 @@ public interface HyPartnerCertificationInfoMapper {
HyPartnerCertificationInfoDO selectByPartnerLineId(@Param("partnerLineId") Long partnerLineId);
int updateLineId(@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
}

View File

@@ -39,5 +39,6 @@ public interface HyPartnerClerkMapper {
List<HyPartnerClerkDO> listByPartnerIdAndLineId(@Param("partnerId") String partnerId,
@Param("partnerLineId") Long partnerLineId);
int updateLineId(@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
}

View File

@@ -49,4 +49,13 @@ public interface HyPartnerIntentInfoMapper {
HyPartnerIntentInfoDO selectByLineId(@Param("lineId") Long lineId);
HyPartnerIntentInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
/**
* updateLineId
* @param newLineId
* @param oldLineId
* @return
*/
int updateLineId(@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
}

View File

@@ -108,4 +108,7 @@ public interface HyPartnerInterviewMapper {
* 查询是否已有该链接
*/
Boolean hasVideoUrls(@Param("videoUrl") String videoUrl);
int updateLineId(@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
}

View File

@@ -170,4 +170,7 @@ public interface HyPartnerInterviewPlanMapper {
@Param("workflowStage") String workflowStage,
@Param("workflowStatus") String workflowStatus);
int updateLineId(@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
}

View File

@@ -139,4 +139,10 @@
from hy_partner_certification_info
where partner_line_id = #{partnerLineId}
</select>
<update id="updateLineId">
update hy_partner_interview
set partner_line_id = #{newLineId}
where partner_line_id = #{oldLineId}
</update>
</mapper>

View File

@@ -141,4 +141,11 @@
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
</select>
<update id="updateLineId">
update hy_partner_clerk
set partner_line_id = #{newLineId}
where partner_line_id = #{oldLineId}
</update>
</mapper>

View File

@@ -296,4 +296,13 @@
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
</select>
<update id="updateLineId">
update hy_partner_intent_info
set partner_line_id = #{newLineId}
where partner_line_id = #{oldLineId}
</update>
</mapper>

View File

@@ -516,4 +516,11 @@
AND hpi.deleted = 0
</select>
<update id="updateLineId">
update hy_partner_interview
set partner_line_id = #{newLineId}
where partner_line_id = #{oldLineId}
</update>
</mapper>

View File

@@ -530,4 +530,10 @@
</select>
<update id="updateLineId">
update hy_partner_interview_plan
set partner_line_id = #{newLineId}
where partner_line_id = #{oldLineId}
</update>
</mapper>

View File

@@ -6,19 +6,14 @@ import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.RedisConstant;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.HyPartnerBaseInfoDAO;
import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dao.HyPartnerTaskInfoLogDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dao.*;
import com.cool.store.dto.log.AddTagsDTO;
import com.cool.store.dto.log.BlackListLogDTO;
import com.cool.store.dto.log.LineLogInfo;
import com.cool.store.entity.HyPartnerBaseInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyPartnerCertificationInfoMapper;
import com.cool.store.request.AddTagsRequest;
import com.cool.store.request.PartnerBaseInfoRequest;
import com.cool.store.service.HyPartnerBaseInfoService;
@@ -66,6 +61,20 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
@Resource
HyPhoneLocationService hyPhoneLocationService;
@Resource
HyPartnerIntentInfoDAO hyPartnerIntentInfoDAO;
@Resource
HyInterviewDAO hyInterviewDAO;
@Resource
HyPartnerInterviewPlanDAO hyPartnerInterviewPlanDAO;
@Resource
HyPartnerClerkDAO hyPartnerClerkDAO;
@Resource
HyPartnerCertificationInfoMapper hyPartnerCertificationInfoMapper;
@Override
@@ -178,9 +187,11 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
HyPartnerLineInfoDO oldLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(oldBaseInfo.getPartnerLineId());
// 该身份证当前申请状态同步至该账号下,原账号变为【加盟意向申请 待提交状态】
HyPartnerLineInfoDO newLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
newLineInfo.setWorkflowStage(oldLineInfo.getWorkflowStage());
newLineInfo.setWorkflowStatus(oldLineInfo.getWorkflowStatus());
newLineInfo.setLineStatus(oldLineInfo.getLineStatus());
Long newLindId = newLineInfo.getId();
String newPartnerId = newLineInfo.getPartnerId();
BeanUtil.copyProperties(oldLineInfo,newLineInfo);
newLineInfo.setId(newLindId);
newLineInfo.setPartnerId(newPartnerId);
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(newLineInfo);
oldLineInfo.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
oldLineInfo.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
@@ -195,7 +206,18 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
// 老的身份证信息置空
fillBaseInfoIdCard(oldBaseInfo, null, null, null, null, null, null, null, null, null);
oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode()));
//修改名称
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(newPartnerId);
if(!hyPartnerUserInfoDO.getUsername().equals(oldBaseInfo.getUsername())){
hyPartnerUserInfoDO.setUsername(oldBaseInfo.getUsername());
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
}
hyPartnerBaseInfoDAO.updateByPrimaryKey(oldBaseInfo);
hyPartnerIntentInfoDAO.updateLineId(newLindId,oldLineInfo.getId());
hyPartnerClerkDAO.updateLineId(newLindId,oldLineInfo.getId());
hyPartnerInterviewPlanDAO.updateLineId(newLindId,oldLineInfo.getId());
hyInterviewDAO.updateLineId(newLindId,oldLineInfo.getId());
hyPartnerCertificationInfoMapper.updateLineId(newLindId,oldLineInfo.getId());
return true;
}