deason hai 3 meses
pai
achega
afdd1d38cb

+ 4 - 0
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/ExamStudentCloudServiceProvider.java

@@ -111,6 +111,10 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport implement
     @Override
     public SaveExamStudentResp saveExamStudent(@RequestBody SaveExamStudentReq req) {
         trim(req);
+
+        if (req.getExamId() == null) {
+            throw new StatusException("考试ID不能为空");
+        }
         ExamEntity exam = GlobalHelper.getEntity(examRepo, req.getExamId(), ExamEntity.class);
         if (exam == null) {
             throw new StatusException("未找到考试");