Просмотр исходного кода

重构考生获取最终分数计算方式

lideyin 5 лет назад
Родитель
Сommit
506ab55469

+ 7 - 0
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/FaceBiopsyServiceImpl.java

@@ -368,6 +368,13 @@ public class FaceBiopsyServiceImpl implements FaceBiopsyService {
 
                         Boolean isPass = Boolean.valueOf(faceCompareResult.get("isPass").toString());
                         Boolean existsSystemError = Boolean.valueOf(faceCompareResult.get("existsSystemError").toString());
+
+                        //如果有系统错误,也需要抛出异常
+                        if (existsSystemError) {
+
+                            throw new StatusException("201008", "活体检测失败,请稍候重试");
+                        }
+
                         //case1.1.有陌生人(即多人脸),不管是否比对成功,直接结束考试
                         if (isStranger) {
                             return true;