Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -150,7 +150,7 @@ public interface HyPartnerLineInfoService {
|
||||
*/
|
||||
String getAssignFollowUser(String partnerId,String type);
|
||||
|
||||
InterviewVO getInterviewInfo(Long lineId) throws ApiException;
|
||||
InterviewVO getInterviewInfo(Long lineId,Boolean needDevelopmentDirector) throws ApiException;
|
||||
|
||||
/**
|
||||
* 生成一条默认线索
|
||||
|
||||
@@ -68,12 +68,7 @@ public class CommonServiceImpl implements CommonService {
|
||||
} else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_4.getCode())) {
|
||||
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "结束面试");
|
||||
}else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_5.getCode())) {
|
||||
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
|
||||
String intentionContractNo = null;
|
||||
if(partnerCertificationInfoDO != null){
|
||||
intentionContractNo = partnerCertificationInfoDO.getIntentionContractNo();
|
||||
}
|
||||
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "发起加盟商资质审核 | "+intentionContractNo);
|
||||
return getInterviewTips(partnerLineId, OperateTypeEnum.FINISH_INTERVIEW, "发起加盟商资质审核");
|
||||
}else if (workflowStage.equals(WorkflowStageEnum.INTERVIEW.getCode()) && workflowStatus.equals(WorkflowStatusEnum.INTERVIEW_6.getCode())) {
|
||||
HyPartnerCertificationInfoDO partnerCertificationInfoDO = hyPartnerCertificationInfoMapper.selectByPartnerLineId(partnerLineId);
|
||||
String intentionContractNo = null;
|
||||
|
||||
@@ -64,11 +64,6 @@ public class ContentServiceImpl implements ContentService {
|
||||
*/
|
||||
@Override
|
||||
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();
|
||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
||||
hyContentInfoDO.setId(Long.parseLong(dto.getContentId()));
|
||||
|
||||
@@ -208,16 +208,26 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode()));
|
||||
//修改名称
|
||||
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.setWantShopArea(oldIntentInfo.getWantShopArea());
|
||||
hyPartnerUserInfoDO.setAcceptAdjustType(oldIntentInfo.getAcceptAdjustType());
|
||||
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());
|
||||
hyPartnerIntentInfoDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyPartnerClerkDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyPartnerInterviewPlanDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyInterviewDAO.updateLineId(newPartnerId,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,12 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.log.AddTagsDTO;
|
||||
import com.cool.store.dto.log.LineLogInfo;
|
||||
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.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
||||
@@ -38,6 +40,7 @@ import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -72,6 +75,8 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
HyPhoneLocationService hyPhoneLocationService;
|
||||
@Resource
|
||||
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
||||
@Autowired
|
||||
private LogService logService;
|
||||
|
||||
@Override
|
||||
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);
|
||||
return null;
|
||||
}
|
||||
WantInfoUpdateDTO.IntentInfoUpdate beforeIntentInfoUpdate = new WantInfoUpdateDTO.IntentInfoUpdate();
|
||||
WantInfoUpdateDTO.IntentInfoUpdate afterIntentInfoUpdate = new WantInfoUpdateDTO.IntentInfoUpdate();
|
||||
|
||||
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||
if(intentInfoDO == null){
|
||||
intentInfoDO = new HyPartnerIntentInfoDO();
|
||||
fillIntentInfo(intentInfoDO, request);
|
||||
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
|
||||
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
|
||||
}else {
|
||||
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
|
||||
fillIntentInfo(intentInfoDO, request);
|
||||
hyPartnerIntentInfoDAO.updateByPrimaryKeySelective(intentInfoDO);
|
||||
BeanUtil.copyProperties(intentInfoDO, afterIntentInfoUpdate);
|
||||
}
|
||||
redisUtilPool.delKey(cacheKey);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(request.getPartnerId());
|
||||
@@ -215,6 +226,12 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@@ -674,11 +674,12 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterviewVO getInterviewInfo(Long lineId) throws ApiException {
|
||||
public InterviewVO getInterviewInfo(Long lineId,Boolean needDevelopmentDirector) throws ApiException {
|
||||
Long interviewId = hyPartnerInterviewPlanDAO.selectInterviewIdByLineId(lineId);
|
||||
QueryByInterviewPlanIdReq queryByInterviewPlanIdReq = new QueryByInterviewPlanIdReq();
|
||||
if (interviewId!=null){
|
||||
queryByInterviewPlanIdReq.setInterviewPlanId(String.valueOf(interviewId));
|
||||
queryByInterviewPlanIdReq.setNeedDevelopmentDirector(needDevelopmentDirector);
|
||||
return interviewService.getInterviewInfo(queryByInterviewPlanIdReq);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.HyIntendDevMappingDAO;
|
||||
import com.cool.store.dao.HyInterviewDAO;
|
||||
import com.cool.store.dto.calendar.CreateCalendarEventDTO;
|
||||
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.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
@@ -107,6 +109,9 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
return interviewList;
|
||||
}
|
||||
|
||||
@Resource
|
||||
HyIntendDevMappingDAO hyIntendDevMappingDAO;
|
||||
|
||||
@Override
|
||||
public InterviewVO getInterviewInfo(QueryByInterviewPlanIdReq request) throws ApiException {
|
||||
String interviewPlanId = request.getInterviewPlanId();
|
||||
@@ -135,12 +140,14 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
//查询开发主管信息
|
||||
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;
|
||||
}
|
||||
//查询开发主管
|
||||
EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(Long.parseLong(affiliationZoneId));
|
||||
EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(Long.parseLong(hyIntendDevelopementMappingDO.getMappingId()));
|
||||
vo.setDevelopmentDirector(development);
|
||||
}
|
||||
return vo;
|
||||
|
||||
Reference in New Issue
Block a user