加盟意向-审核流程
加盟意向拒绝意见
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user