Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init

This commit is contained in:
苏竹红
2024-04-02 17:01:25 +08:00
7 changed files with 49 additions and 6 deletions

View File

@@ -15,4 +15,7 @@ public interface JoinIntentionMapper {
MemberQuestionDO getByLineId(@Param("lineId") Long lineId);
List<MemberQuestionDO> getByLineIds(@Param("lineIds") List<Long> lineIds);
void updateAuditIdByLineId(@Param("auditId") Long auditId,
@Param("lineId") Long id);
}

View File

@@ -104,6 +104,11 @@
<if test="request.canTraining != null">can_training = #{request.canTraining},</if>
</trim>
</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

View File

@@ -66,6 +66,10 @@ public class PartnerBaseInfoVO {
private Integer deleted;
@ApiModelProperty("公开拒绝原因")
private String rejectPublicReason;
public static PartnerBaseInfoVO from(MemberQuestionDO memberQuestionDO, LineInfoDO lineInfoDO) {

View File

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

View File

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

View File

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

View File

@@ -32,8 +32,7 @@ public class PCIntentAgreementController {
@PostMapping(path = "/initiating")
@ApiOperation("kdz -> xfsg 发起意向协议流程")
public ResponseResult<InitiatingResponse> initiating(@RequestParam
@RequestBody InitiatingRequest request) {
public ResponseResult<InitiatingResponse> initiating(@RequestBody InitiatingRequest request) {
return ResponseResult.success(intentAgreementService.initiating(request));
}
}