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

This commit is contained in:
zhangchenbiao
2023-07-04 20:15:03 +08:00
25 changed files with 163 additions and 48 deletions

View File

@@ -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)),
; ;

View File

@@ -47,11 +47,11 @@ public class HyInterviewDAO {
} }
public int updateLineId(Long newLineId,Long oldLineId){ public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
if (newLineId==null || Objects.isNull(oldLineId)){ if (newLineId==null || Objects.isNull(oldLineId)){
return 0; return 0;
} }
return interviewMapper.updateLineId(newLineId, oldLineId); return interviewMapper.updateLineId(newPartnerId,newLineId, oldLineId);
} }
} }

View File

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

View File

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

View File

@@ -106,10 +106,10 @@ public class HyPartnerInterviewPlanDAO {
} }
public int updateLineId(Long newLineId,Long oldLineId){ public int updateLineId(String newPartnerId,Long newLineId,Long oldLineId){
if (newLineId==null || Objects.isNull(oldLineId)){ if (newLineId==null || Objects.isNull(oldLineId)){
return 0; return 0;
} }
return hyPartnerInterviewPlanMapper.updateLineId(newLineId, oldLineId); return hyPartnerInterviewPlanMapper.updateLineId(newPartnerId,newLineId, oldLineId);
} }
} }

View File

@@ -39,7 +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); int updateLineId(@Param("newPartnerId") String newPartnerId, @Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
} }

View File

@@ -39,6 +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); int updateLineId(@Param("newPartnerId")String newPartnerId,@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
} }

View File

@@ -57,5 +57,5 @@ public interface HyPartnerIntentInfoMapper {
* @param oldLineId * @param oldLineId
* @return * @return
*/ */
int updateLineId(@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId); int updateLineId(@Param("newPartnerId")String newPartnerId,@Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
} }

View File

@@ -109,6 +109,6 @@ 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); int updateLineId(@Param("newPartnerId") String newPartnerId, @Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
} }

View File

@@ -170,7 +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); int updateLineId(@Param("newPartnerId") String newPartnerId, @Param("newLineId") Long newLineId, @Param("oldLineId") Long oldLineId);
} }

View File

@@ -142,7 +142,7 @@
<update id="updateLineId"> <update id="updateLineId">
update hy_partner_interview update hy_partner_interview
set partner_line_id = #{newLineId} set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
where partner_line_id = #{oldLineId} where partner_line_id = #{oldLineId}
</update> </update>
</mapper> </mapper>

View File

@@ -143,7 +143,7 @@
<update id="updateLineId"> <update id="updateLineId">
update hy_partner_clerk update hy_partner_clerk
set partner_line_id = #{newLineId} set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
where partner_line_id = #{oldLineId} where partner_line_id = #{oldLineId}
</update> </update>

View File

@@ -299,7 +299,7 @@
<update id="updateLineId"> <update id="updateLineId">
update hy_partner_intent_info update hy_partner_intent_info
set partner_line_id = #{newLineId} set partner_line_id = #{newLineId},partner_id = #{newPartnerId}
where partner_line_id = #{oldLineId} where partner_line_id = #{oldLineId}
</update> </update>

View File

@@ -518,7 +518,7 @@
<update id="updateLineId"> <update id="updateLineId">
update hy_partner_interview update hy_partner_interview
set partner_line_id = #{newLineId} set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
where partner_line_id = #{oldLineId} where partner_line_id = #{oldLineId}
</update> </update>

View File

@@ -533,7 +533,7 @@
<update id="updateLineId"> <update id="updateLineId">
update hy_partner_interview_plan update hy_partner_interview_plan
set partner_line_id = #{newLineId} set partner_line_id = #{newLineId} , partner_id = #{newPartnerId}
where partner_line_id = #{oldLineId} where partner_line_id = #{oldLineId}
</update> </update>
</mapper> </mapper>

View File

@@ -593,10 +593,10 @@
<!-- 根据面试计划 id 查询战区 id --> <!-- 根据面试计划 id 查询战区 id -->
<select id="getAffiliationZoneIdByInterviewPlanId" resultType="java.lang.String"> <select id="getAffiliationZoneIdByInterviewPlanId" resultType="java.lang.String">
SELECT affiliation_zone SELECT want_shop_area
FROM hy_partner_line_info FROM hy_partner_user_info
WHERE id = ( WHERE partner_id = (
SELECT partner_line_id SELECT partner_id
FROM hy_partner_interview_plan FROM hy_partner_interview_plan
WHERE id = #{interviewPlanId} WHERE id = #{interviewPlanId}
) )

View File

@@ -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;
}
}

View File

@@ -150,7 +150,7 @@ public interface HyPartnerLineInfoService {
*/ */
String getAssignFollowUser(String partnerId,String type); String getAssignFollowUser(String partnerId,String type);
InterviewVO getInterviewInfo(Long lineId) throws ApiException; InterviewVO getInterviewInfo(Long lineId,Boolean needDevelopmentDirector) throws ApiException;
/** /**
* 生成一条默认线索 * 生成一条默认线索

View File

@@ -68,12 +68,7 @@ public class CommonServiceImpl implements CommonService {
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_4.getCode())) { } else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_4.getCode())) {
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "结束面试"); return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "结束面试");
}else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_5.getCode())) { }else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_5.getCode())) {
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId); return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "发起加盟商资质审核");
String intentionContractNo = null;
if(partnerCertificationInfoDO != null){
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
}
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "发起加盟商资质审核 | "+intentionContractNo);
}else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_6.getCode())) { }else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_6.getCode())) {
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId); HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
String intentionContractNo = null; String intentionContractNo = null;

View File

@@ -64,11 +64,6 @@ public class ContentServiceImpl implements ContentService {
*/ */
@Override @Override
public void updateContent(ContentUpdateDto dto) throws ApiException { public void updateContent(ContentUpdateDto dto) throws ApiException {
//增加不允许重复标题的逻辑
Boolean isDuplicated = contentInfoMapper.whetherTitleDuplicated(dto.getContentTitle());
if (isDuplicated) {
throw new ApiException(ErrorCodeEnum.CONTENT_DUPLICATED);
}
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO(); HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
BeanUtil.copyProperties(dto, hyContentInfoDO); BeanUtil.copyProperties(dto, hyContentInfoDO);
hyContentInfoDO.setId(Long.parseLong(dto.getContentId())); hyContentInfoDO.setId(Long.parseLong(dto.getContentId()));

View File

@@ -208,16 +208,26 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode())); oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode()));
//修改名称 //修改名称
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(newPartnerId); HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(newPartnerId);
if(!hyPartnerUserInfoDO.getUsername().equals(oldBaseInfo.getUsername())){ HyPartnerIntentInfoDO oldIntentInfo = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(oldLineInfo.getPartnerId(), oldLineInfo.getId());
if(!hyPartnerUserInfoDO.getUsername().equals(oldBaseInfo.getUsername()) || !hyPartnerUserInfoDO.getWantShopArea().equals(oldIntentInfo.getWantShopArea())
|| !hyPartnerUserInfoDO.getAcceptAdjustType().equals(oldIntentInfo.getAcceptAdjustType())){
hyPartnerUserInfoDO.setUsername(oldBaseInfo.getUsername()); hyPartnerUserInfoDO.setUsername(oldBaseInfo.getUsername());
hyPartnerUserInfoDO.setWantShopArea(oldIntentInfo.getWantShopArea());
hyPartnerUserInfoDO.setAcceptAdjustType(oldIntentInfo.getAcceptAdjustType());
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO); hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
} }
hyPartnerBaseInfoDAO.updateByPrimaryKey(oldBaseInfo); hyPartnerBaseInfoDAO.updateByPrimaryKey(oldBaseInfo);
hyPartnerIntentInfoDAO.updateLineId(newLindId,oldLineInfo.getId()); hyPartnerIntentInfoDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
hyPartnerClerkDAO.updateLineId(newLindId,oldLineInfo.getId()); hyPartnerClerkDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
hyPartnerInterviewPlanDAO.updateLineId(newLindId,oldLineInfo.getId()); hyPartnerInterviewPlanDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
hyInterviewDAO.updateLineId(newLindId,oldLineInfo.getId()); hyInterviewDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
hyPartnerCertificationInfoMapper.updateLineId(newLindId,oldLineInfo.getId()); hyPartnerCertificationInfoMapper.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
String cacheKeyBaseInfo = MessageFormat.format(RedisConstant.PARTNER_BASEINFO_CACHE_KEY, newPartnerId, newLindId);
String cacheKeyClerkInfo = MessageFormat.format(RedisConstant.PARTNER_CLERKINFO_CACHE_KEY,newPartnerId, newLindId);
String cacheKeyIntentInfo = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, newPartnerId, newLindId);
redisUtilPool.delKey(cacheKeyBaseInfo);
redisUtilPool.delKey(cacheKeyClerkInfo);
redisUtilPool.delKey(cacheKeyIntentInfo);
return true; return true;
} }

View File

@@ -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();
} }

View File

@@ -674,11 +674,12 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
} }
@Override @Override
public InterviewVO getInterviewInfo(Long lineId) throws ApiException { public InterviewVO getInterviewInfo(Long lineId,Boolean needDevelopmentDirector) throws ApiException {
Long interviewId = hyPartnerInterviewPlanDAO.selectInterviewIdByLineId(lineId); Long interviewId = hyPartnerInterviewPlanDAO.selectInterviewIdByLineId(lineId);
QueryByInterviewPlanIdReq queryByInterviewPlanIdReq = new QueryByInterviewPlanIdReq(); QueryByInterviewPlanIdReq queryByInterviewPlanIdReq = new QueryByInterviewPlanIdReq();
if (interviewId!=null){ if (interviewId!=null){
queryByInterviewPlanIdReq.setInterviewPlanId(String.valueOf(interviewId)); queryByInterviewPlanIdReq.setInterviewPlanId(String.valueOf(interviewId));
queryByInterviewPlanIdReq.setNeedDevelopmentDirector(needDevelopmentDirector);
return interviewService.getInterviewInfo(queryByInterviewPlanIdReq); return interviewService.getInterviewInfo(queryByInterviewPlanIdReq);
} }
return null; return null;

View File

@@ -11,6 +11,7 @@ import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.context.PartnerUserHolder; import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.EnterpriseUserDAO; import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyIntendDevMappingDAO;
import com.cool.store.dao.HyInterviewDAO; import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dto.calendar.CreateCalendarEventDTO; import com.cool.store.dto.calendar.CreateCalendarEventDTO;
import com.cool.store.dto.calendar.DeleteCalendarEventDTO; import com.cool.store.dto.calendar.DeleteCalendarEventDTO;
@@ -46,6 +47,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
@@ -107,6 +109,9 @@ public class InterviewServiceImpl implements InterviewService {
return interviewList; return interviewList;
} }
@Resource
HyIntendDevMappingDAO hyIntendDevMappingDAO;
@Override @Override
public InterviewVO getInterviewInfo(QueryByInterviewPlanIdReq request) throws ApiException { public InterviewVO getInterviewInfo(QueryByInterviewPlanIdReq request) throws ApiException {
String interviewPlanId = request.getInterviewPlanId(); String interviewPlanId = request.getInterviewPlanId();
@@ -135,12 +140,14 @@ public class InterviewServiceImpl implements InterviewService {
//查询开发主管信息 //查询开发主管信息
if (request.getNeedDevelopmentDirector() != null && request.getNeedDevelopmentDirector()) { if (request.getNeedDevelopmentDirector() != null && request.getNeedDevelopmentDirector()) {
//查询所属战区 //查询所属战区
String affiliationZoneId = hyPartnerLineInfoMapper.getAffiliationZoneIdByInterviewPlanId(interviewPlanId);
if (affiliationZoneId == null) { String wantShopArea = hyPartnerLineInfoMapper.getAffiliationZoneIdByInterviewPlanId(interviewPlanId);
HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = hyIntendDevMappingDAO.selectByOpenAreaMappingId(Long.valueOf(wantShopArea), "dev");
if (hyIntendDevelopementMappingDO == null) {
return vo; return vo;
} }
//查询开发主管 //查询开发主管
EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(Long.parseLong(affiliationZoneId)); EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(Long.parseLong(hyIntendDevelopementMappingDO.getMappingId()));
vo.setDevelopmentDirector(development); vo.setDevelopmentDirector(development);
} }
return vo; return vo;

View File

@@ -302,7 +302,8 @@ public class DeskController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false), @ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
}) })
public ResponseResult<InterviewVO> getInterviewInfoByLineId(@RequestParam(value = "lineId",required = false)Long lineId) throws ApiException { public ResponseResult<InterviewVO> getInterviewInfoByLineId(@RequestParam(value = "lineId",required = false)Long lineId,
return ResponseResult.success(hyPartnerLineInfoService.getInterviewInfo(lineId)); @RequestParam(value = "needDevelopmentDirector",required = false)Boolean needDevelopmentDirector) throws ApiException {
return ResponseResult.success(hyPartnerLineInfoService.getInterviewInfo(lineId,needDevelopmentDirector));
} }
} }