提交答案添加判断

This commit is contained in:
cjw 2024-08-01 14:47:33 +08:00
parent 2473d83ba3
commit 43965116f5
1 changed files with 3 additions and 0 deletions

View File

@ -158,6 +158,9 @@ public class EvaluationServiceImpl implements IEvaluationService {
}
List<SysEvaluationAnswer> answerAdd = MapstructUtils.convert(answerList, SysEvaluationAnswer.class);
if (answerAdd.stream().anyMatch(entity -> entity.getAnswerId() == null)) {
throw new ServiceException("有题目未作选择,请检查后提交");
}
evaluationAnswerMapper.insertBatch(answerAdd);
//
List<SysEvaluationConclusionVo> list;