TrainingExperienceServiceImpl.java

This commit is contained in:
guohb
2024-04-09 19:05:23 +08:00
parent f042a1f72b
commit b15154bcf7

View File

@@ -86,13 +86,18 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
@Transactional(rollbackFor = Exception.class)
public void experienceStatusChange(Long lineId, Integer status, String abandonCause) {
trainingExperienceMapper.updateStatus(lineId,status,abandonCause);
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(lineId);
if (ExperienceStatusEnum.DONE.getExperienceStatus().equals(status)){
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(lineId);
if (Objects.isNull(lineInfoDO)){
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
}
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode());
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100.getCode());
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
}else {
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_95.getCode());
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
}
}