Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -15,4 +15,7 @@ public interface JoinIntentionMapper {
|
|||||||
MemberQuestionDO getByLineId(@Param("lineId") Long lineId);
|
MemberQuestionDO getByLineId(@Param("lineId") Long lineId);
|
||||||
|
|
||||||
List<MemberQuestionDO> getByLineIds(@Param("lineIds") List<Long> lineIds);
|
List<MemberQuestionDO> getByLineIds(@Param("lineIds") List<Long> lineIds);
|
||||||
|
|
||||||
|
void updateAuditIdByLineId(@Param("auditId") Long auditId,
|
||||||
|
@Param("lineId") Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,11 @@
|
|||||||
<if test="request.canTraining != null">can_training = #{request.canTraining},</if>
|
<if test="request.canTraining != null">can_training = #{request.canTraining},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
<update id="updateAuditIdByLineId">
|
||||||
|
update xfsg_member_question_info
|
||||||
|
set audit_id = #{auditId}
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getByLineId" resultType="com.cool.store.entity.MemberQuestionDO">
|
<select id="getByLineId" resultType="com.cool.store.entity.MemberQuestionDO">
|
||||||
select
|
select
|
||||||
|
|||||||
@@ -66,6 +66,10 @@ public class PartnerBaseInfoVO {
|
|||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("公开拒绝原因")
|
||||||
|
private String rejectPublicReason;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static PartnerBaseInfoVO from(MemberQuestionDO memberQuestionDO, LineInfoDO lineInfoDO) {
|
public static PartnerBaseInfoVO from(MemberQuestionDO memberQuestionDO, LineInfoDO lineInfoDO) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.cool.store.entity.EnterpriseUserDO;
|
|||||||
import com.cool.store.entity.UserAuthMappingDO;
|
import com.cool.store.entity.UserAuthMappingDO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* describe:
|
* describe:
|
||||||
@@ -28,6 +29,14 @@ public interface UserAuthMappingService {
|
|||||||
*/
|
*/
|
||||||
EnterpriseUserDO getUserByRoleNameAndAreaId(String roleName, Long wantShopAreaId);
|
EnterpriseUserDO getUserByRoleNameAndAreaId(String roleName, Long wantShopAreaId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跟进角色和战区获取用户id
|
||||||
|
* @param roleIds
|
||||||
|
* @param regionId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, List<String>> getUserIdByRoleIdAndRegionId(List<String> roleIds, Long regionId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
||||||
* @param userId
|
* @param userId
|
||||||
|
|||||||
@@ -2,14 +2,12 @@ package com.cool.store.service.impl;
|
|||||||
|
|
||||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.LineInfoDO;
|
|
||||||
import com.cool.store.entity.MemberQuestionDO;
|
|
||||||
import com.cool.store.entity.PartnerBaseInfoDO;
|
|
||||||
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.HyOpenAreaInfoMapper;
|
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||||
import com.cool.store.mapper.JoinIntentionMapper;
|
import com.cool.store.mapper.JoinIntentionMapper;
|
||||||
|
import com.cool.store.mapper.LineAuditInfoMapper;
|
||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
import com.cool.store.request.JoinIntentionRequest;
|
import com.cool.store.request.JoinIntentionRequest;
|
||||||
import com.cool.store.service.JoinIntentionService;
|
import com.cool.store.service.JoinIntentionService;
|
||||||
@@ -42,6 +40,10 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
@Resource
|
@Resource
|
||||||
HyOpenAreaInfoMapper openAreaInfoMapper;
|
HyOpenAreaInfoMapper openAreaInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
LineAuditInfoMapper lineAuditInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean submit(JoinIntentionRequest request) {
|
public boolean submit(JoinIntentionRequest request) {
|
||||||
@@ -78,6 +80,8 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||||
//更新线索阶段
|
//更新线索阶段
|
||||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus());
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus());
|
||||||
|
//更新加盟问卷信息
|
||||||
|
joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId());
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +89,8 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
|
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
|
||||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_7.getCode());
|
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_7.getCode());
|
||||||
lineInfoDAO.updateLineInfo(lineInfo);
|
lineInfoDAO.updateLineInfo(lineInfo);
|
||||||
|
//更新加盟问卷信息
|
||||||
|
joinIntentionMapper.updateAuditIdByLineId(auditId,lineInfo.getId());
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,12 +104,20 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
public PartnerBaseInfoVO getByLineId(Long lineId) {
|
public PartnerBaseInfoVO getByLineId(Long lineId) {
|
||||||
MemberQuestionDO result = joinIntentionMapper.getByLineId(lineId);
|
MemberQuestionDO result = joinIntentionMapper.getByLineId(lineId);
|
||||||
LineInfoDO byLineId = lineInfoDAO.getLineInfo(lineId);
|
LineInfoDO byLineId = lineInfoDAO.getLineInfo(lineId);
|
||||||
|
|
||||||
if (Objects.isNull(result)) {
|
if (Objects.isNull(result)) {
|
||||||
throw new ServiceException(LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
PartnerBaseInfoVO response = PartnerBaseInfoVO.from(result, byLineId);
|
PartnerBaseInfoVO response = PartnerBaseInfoVO.from(result, byLineId);
|
||||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(Long.valueOf(response.getAreaCode()));
|
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(Long.valueOf(response.getAreaCode()));
|
||||||
response.setArea(openAreaInfoDO.getAreaPath());
|
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;
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.cool.store.utils.RedisConstantUtil;
|
|||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.vo.SysRoleVO;
|
import com.cool.store.vo.SysRoleVO;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
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.collections4.ListUtils;
|
import org.apache.commons.collections4.ListUtils;
|
||||||
@@ -107,6 +108,14 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
return userDO;
|
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 团队线索
|
* 根据 人 查 这个人管辖区域 对应的意向区域省市code 团队线索
|
||||||
* @param userId
|
* @param userId
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ public class PCIntentAgreementController {
|
|||||||
|
|
||||||
@PostMapping(path = "/initiating")
|
@PostMapping(path = "/initiating")
|
||||||
@ApiOperation("kdz -> xfsg 发起意向协议流程")
|
@ApiOperation("kdz -> xfsg 发起意向协议流程")
|
||||||
public ResponseResult<InitiatingResponse> initiating(@RequestParam
|
public ResponseResult<InitiatingResponse> initiating(@RequestBody InitiatingRequest request) {
|
||||||
@RequestBody InitiatingRequest request) {
|
|
||||||
return ResponseResult.success(intentAgreementService.initiating(request));
|
return ResponseResult.success(intentAgreementService.initiating(request));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user