加盟意向-审核流程
加盟意向拒绝意见
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) {
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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