Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -4,6 +4,7 @@ import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.UserAuthMappingDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* describe:
|
||||
@@ -28,6 +29,14 @@ public interface UserAuthMappingService {
|
||||
*/
|
||||
EnterpriseUserDO getUserByRoleNameAndAreaId(String roleName, Long wantShopAreaId);
|
||||
|
||||
/**
|
||||
* 跟进角色和战区获取用户id
|
||||
* @param roleIds
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
Map<String, List<String>> getUserIdByRoleIdAndRegionId(List<String> roleIds, Long regionId);
|
||||
|
||||
/**
|
||||
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
||||
* @param userId
|
||||
|
||||
@@ -2,14 +2,12 @@ package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.MemberQuestionDO;
|
||||
import com.cool.store.entity.PartnerBaseInfoDO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.mapper.JoinIntentionMapper;
|
||||
import com.cool.store.mapper.LineAuditInfoMapper;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.request.JoinIntentionRequest;
|
||||
import com.cool.store.service.JoinIntentionService;
|
||||
@@ -42,6 +40,10 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
@Resource
|
||||
HyOpenAreaInfoMapper openAreaInfoMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
LineAuditInfoMapper lineAuditInfoMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(JoinIntentionRequest request) {
|
||||
@@ -78,6 +80,8 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
//更新线索阶段
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus());
|
||||
//更新加盟问卷信息
|
||||
joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId());
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -85,6 +89,8 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_7.getCode());
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
//更新加盟问卷信息
|
||||
joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId());
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -98,12 +104,20 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
public PartnerBaseInfoVO getByLineId(Long lineId) {
|
||||
MemberQuestionDO result = joinIntentionMapper.getByLineId(lineId);
|
||||
LineInfoDO byLineId = lineInfoDAO.getLineInfo(lineId);
|
||||
|
||||
if (Objects.isNull(result)) {
|
||||
throw new ServiceException(LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
PartnerBaseInfoVO response = PartnerBaseInfoVO.from(result, byLineId);
|
||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(Long.valueOf(response.getAreaCode()));
|
||||
response.setArea(openAreaInfoDO.getAreaPath());
|
||||
if (Objects.nonNull(result.getAuditId())){
|
||||
LineAuditInfoDO lineAuditInfoDO = lineAuditInfoMapper.selectByPrimaryKey(result.getAuditId());
|
||||
if (Objects.isNull(lineAuditInfoDO)){
|
||||
response.setRejectPublicReason(null);
|
||||
}
|
||||
response.setRejectPublicReason(lineAuditInfoDO.getRejectPublicReason());
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.cool.store.utils.RedisConstantUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.vo.SysRoleVO;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
@@ -107,6 +108,14 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
return userDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<String>> getUserIdByRoleIdAndRegionId(List<String> roleIds, Long regionId) {
|
||||
if(CollectionUtils.isEmpty(roleIds) || Objects.isNull(regionId)){
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
||||
* @param userId
|
||||
|
||||
Reference in New Issue
Block a user