换绑操作日志处理
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.log.LineLogInfo;
|
||||
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
|
||||
import com.cool.store.enums.OperateTypeEnum;
|
||||
@@ -50,6 +51,19 @@ public class HyPartnerTaskInfoLogDAO {
|
||||
insertSelective(logInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日志
|
||||
* @param lineId
|
||||
* @param message
|
||||
* @return
|
||||
*/
|
||||
public int deleteByLineId(Long lineId, String message){
|
||||
if(Objects.isNull(lineId)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return hyPartnerTaskInfoLogMapper.deleteByLineId(lineId, message);
|
||||
}
|
||||
|
||||
public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
|
||||
if (newLineId==null || Objects.isNull(oldLineId)){
|
||||
return 0;
|
||||
|
||||
@@ -39,4 +39,12 @@ public interface HyPartnerTaskInfoLogMapper {
|
||||
* @return
|
||||
*/
|
||||
Page<HyPartnerTaskInfoLogDO> getLogPageByLineId(@Param("partnerLineId")Long partnerLineId, @Param("operateTypes")List<String> operateTypes);
|
||||
|
||||
/**
|
||||
* 删除线索
|
||||
* @param partnerLineId
|
||||
* @param message
|
||||
* @return
|
||||
*/
|
||||
int deleteByLineId(@Param("partnerLineId") Long partnerLineId, @Param("message") String message);
|
||||
}
|
||||
@@ -186,7 +186,12 @@
|
||||
</update>
|
||||
|
||||
<update id="cancelUndoFollowTask">
|
||||
update hy_follow_task set task_status = '3' where partner_line_id = #{partnerLineId} and task_status in ('0', '2')
|
||||
update
|
||||
hy_follow_task
|
||||
set
|
||||
task_status = if(deadline >= now(), 3, 5)
|
||||
where
|
||||
partner_line_id = #{partnerLineId} and task_status in ('0', '2')
|
||||
</update>
|
||||
|
||||
<select id="getRemindFollowUserIds" resultType="string">
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<include refid="Blob_Column_List"/>
|
||||
from hy_partner_task_info_log
|
||||
where partner_line_id = #{partnerLineId}
|
||||
and operate_type = #{operateType}
|
||||
and operate_type = #{operateType} and deleted = '0'
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
@@ -156,8 +156,12 @@
|
||||
from
|
||||
hy_partner_task_info_log
|
||||
where
|
||||
partner_line_id= #{partnerLineId} and operate_type in <foreach collection="operateTypes" open="(" close=")" separator="," item="operateType">#{operateType}</foreach>
|
||||
deleted = '0' and partner_line_id= #{partnerLineId} and operate_type in <foreach collection="operateTypes" open="(" close=")" separator="," item="operateType">#{operateType}</foreach>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<update id="deleteByLineId">
|
||||
update hy_partner_task_info_log set deleted = '1', message = #{message} where partner_line_id= #{partnerLineId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -268,7 +268,11 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
hyPartnerInterviewPlanDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyInterviewDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyPartnerCertificationInfoMapper.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
//软删新线索操作日志
|
||||
hyPartnerTaskInfoLogDAO.deleteByLineId(newLindId, "换绑");
|
||||
hyPartnerTaskInfoLogDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
//先作废新的线索跟进任务
|
||||
hyFollowTaskDAO.cancelUndoFollowTask(newLindId);
|
||||
hyFollowTaskDAO.changeLineId(oldLineInfo.getId(), newLindId);
|
||||
String cacheKeyBaseInfo = MessageFormat.format(RedisConstant.PARTNER_BASEINFO_CACHE_KEY, newPartnerId, newLindId);
|
||||
String cacheKeyClerkInfo = MessageFormat.format(RedisConstant.PARTNER_CLERKINFO_CACHE_KEY,newPartnerId, newLindId);
|
||||
|
||||
Reference in New Issue
Block a user