deason %!s(int64=3) %!d(string=hai) anos
pai
achega
34d99ddd49

+ 5 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordPaperStructServiceImpl.java

@@ -1,5 +1,6 @@
 package cn.com.qmth.examcloud.core.oe.admin.service.impl;
 
+import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.core.oe.admin.base.Constants;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.NewQuestionType;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.Sentence;
@@ -47,6 +48,10 @@ public class ExamRecordPaperStructServiceImpl implements ExamRecordPaperStructSe
     @Override
     public ExamRecordPaperStructEntity getExamRecordPaperStruct(Long examRecordDataId) {
         ExamRecordDataEntity examRecordDataEntity = GlobalHelper.getEntity(examRecordDataRepo, examRecordDataId, ExamRecordDataEntity.class);
+        if (examRecordDataEntity == null) {
+            throw new StatusException("400404", "未找到考试记录数据");
+        }
+
         String paperStructId = examRecordDataEntity.getPaperStructId();
         ExamRecordPaperStructEntity examRecordPaperStruct = null;
         if (StringUtils.isBlank(paperStructId)) {