换绑微信

This commit is contained in:
苏竹红
2023-07-04 15:50:36 +08:00
parent afb07804a0
commit a380819e9e
15 changed files with 107 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Objects;
@Repository @Repository
public class HyInterviewDAO { 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); 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); 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.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* @Author suzhuhong * @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); 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, List<HyPartnerClerkDO> listByPartnerIdAndLineId(@Param("partnerId") String partnerId,
@Param("partnerLineId") Long partnerLineId); @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 selectByLineId(@Param("lineId") Long lineId);
HyPartnerIntentInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId); 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); 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("workflowStage") String workflowStage,
@Param("workflowStatus") String workflowStatus); @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 from hy_partner_certification_info
where partner_line_id = #{partnerLineId} where partner_line_id = #{partnerLineId}
</select> </select>
<update id="updateLineId">
update hy_partner_interview
set partner_line_id = #{newLineId}
where partner_line_id = #{oldLineId}
</update>
</mapper> </mapper>

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,19 +6,14 @@ 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.dao.HyPartnerBaseInfoDAO; import com.cool.store.dao.*;
import com.cool.store.dao.HyPartnerLineInfoDAO;
import com.cool.store.dao.HyPartnerTaskInfoLogDAO;
import com.cool.store.dao.HyPartnerUserInfoDAO;
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.entity.HyPartnerBaseInfoDO; import com.cool.store.entity.*;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.HyPartnerCertificationInfoMapper;
import com.cool.store.request.AddTagsRequest; import com.cool.store.request.AddTagsRequest;
import com.cool.store.request.PartnerBaseInfoRequest; import com.cool.store.request.PartnerBaseInfoRequest;
import com.cool.store.service.HyPartnerBaseInfoService; import com.cool.store.service.HyPartnerBaseInfoService;
@@ -66,6 +61,20 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO; HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
@Resource @Resource
HyPhoneLocationService hyPhoneLocationService; HyPhoneLocationService hyPhoneLocationService;
@Resource
HyPartnerIntentInfoDAO hyPartnerIntentInfoDAO;
@Resource
HyInterviewDAO hyInterviewDAO;
@Resource
HyPartnerInterviewPlanDAO hyPartnerInterviewPlanDAO;
@Resource
HyPartnerClerkDAO hyPartnerClerkDAO;
@Resource
HyPartnerCertificationInfoMapper hyPartnerCertificationInfoMapper;
@Override @Override
@@ -178,9 +187,9 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
HyPartnerLineInfoDO oldLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(oldBaseInfo.getPartnerLineId()); HyPartnerLineInfoDO oldLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(oldBaseInfo.getPartnerLineId());
// 该身份证当前申请状态同步至该账号下,原账号变为【加盟意向申请 待提交状态】 // 该身份证当前申请状态同步至该账号下,原账号变为【加盟意向申请 待提交状态】
HyPartnerLineInfoDO newLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId); HyPartnerLineInfoDO newLineInfo = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
newLineInfo.setWorkflowStage(oldLineInfo.getWorkflowStage()); Long newLindId = newLineInfo.getId();
newLineInfo.setWorkflowStatus(oldLineInfo.getWorkflowStatus()); BeanUtil.copyProperties(oldLineInfo,newLineInfo);
newLineInfo.setLineStatus(oldLineInfo.getLineStatus()); newLineInfo.setId(newLindId);
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(newLineInfo); hyPartnerLineInfoDAO.updateByPrimaryKeySelective(newLineInfo);
oldLineInfo.setWorkflowStage(WorkflowStageEnum.INTENT.getCode()); oldLineInfo.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
oldLineInfo.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode()); oldLineInfo.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
@@ -196,6 +205,11 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
fillBaseInfoIdCard(oldBaseInfo, null, null, null, null, null, null, null, null, null); fillBaseInfoIdCard(oldBaseInfo, null, null, null, null, null, null, null, null, null);
oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode())); oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode()));
hyPartnerBaseInfoDAO.updateByPrimaryKey(oldBaseInfo); 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; return true;
} }