ErrorCodeEnum

This commit is contained in:
guohb
2024-04-10 10:59:08 +08:00
parent 2889bb0c7e
commit 83d1ff2d07
2 changed files with 7 additions and 2 deletions

View File

@@ -138,6 +138,11 @@ public enum ErrorCodeEnum {
ONLY_WAR_REGION_CONFIG(108002, "意向省市只能配置到战区",null),
NOT_APPROVE_NODE(109001, "不是审批节点",null),
TIME_FALSE(109002, "结束时间不能早于开始时间",null),
;

View File

@@ -58,13 +58,13 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
return Boolean.FALSE;
}
if (Objects.isNull(request.getLineId())) {
throw new ServiceException(INTERVIEW_LINE_ID_IS_NULL);
throw new ServiceException(ErrorCodeEnum.INTERVIEW_LINE_ID_IS_NULL);
}
LeaseBaseInfoDO leaseBaseInfoDO = request.toLeaseBaseInfoDO();
Date currentDate = new Date();
LineInfoDO lineInfoDO = new LineInfoDO();
if (request.getExperienceStartTime().compareTo(request.getExperienceEndTime()) >= 0){
throw new ServiceException("结束时间不能早于开始时间");
throw new ServiceException(ErrorCodeEnum.TIME_FALSE);
}
if (currentDate.before(request.getExperienceStartTime())){
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());