|
|
|
@ -126,6 +126,12 @@ public class SaveOrUpdateTaskDomainServiceImpl implements SaveOrUpdateTaskDomain |
|
|
|
if (StrUtil.isBlank(dto.getName())) { |
|
|
|
throw new BusinessErrorException("考试任务名称不能为空"); |
|
|
|
} |
|
|
|
//校验考试名称是否存在
|
|
|
|
long count = taskBaseService.count(new LambdaQueryWrapper<TaskEntity>().eq(TaskEntity::getName, dto.getName())); |
|
|
|
if (count > 0){ |
|
|
|
throw new BusinessErrorException("考试任务名称已存在"); |
|
|
|
} |
|
|
|
|
|
|
|
if (StrUtil.length(dto.getName()) > 10) { |
|
|
|
throw new BusinessErrorException("考试任务名称过长"); |
|
|
|
} |
|
|
|
|