deason преди 3 години
родител
ревизия
1caf0d71a9

+ 5 - 1
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamFaceLiveVerifyServiceImpl.java

@@ -80,7 +80,11 @@ public class ExamFaceLiveVerifyServiceImpl implements ExamFaceLiveVerifyService
         }
 
         if (times > 2) {
-            throw new StatusException("活检次数不能超过2次");
+            // 返回空对象供前端判断
+            log.warn("活检次数已超过2次!examRecordDataId = {}, studentId = {}", examRecordDataId, studentId);
+            FaceLiveVerifyInfo info = new FaceLiveVerifyInfo();
+            info.setTimes(times);
+            return info;
         }
 
         if (faceLiveVerifyId == null) {