Browse Source

代码优化

lideyin 5 years ago
parent
commit
0a45ac6435

+ 3 - 3
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/impl/ExamCaptureServiceImpl.java

@@ -635,11 +635,11 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
     private boolean calculateFaceCompareIsStranger(Long examRecordDataId, Long studentId, JSONObject jsonObject) {
         JSONArray face2Array = jsonObject.getJSONArray("faces2");
         //添加是否有陌生人开关功能
-        ExamRecordPropertyCacheBean examRecordPropertyCache = CacheHelper.getExamRecordProperty(examRecordDataId);
+        ExamRecordData examRecordDataCache = examRecordDataService.getExamRecordDataCache(examRecordDataId);
         //默认开启了陌生人检测
         String isStrangerEnableStr = "true";
-        if (examRecordPropertyCache != null) {
-            isStrangerEnableStr = ExamCacheTransferHelper.getCachedExamProperty(examRecordPropertyCache.getExamId(),
+        if (examRecordDataCache != null) {
+            isStrangerEnableStr = ExamCacheTransferHelper.getCachedExamProperty(examRecordDataCache.getExamId(),
                     studentId,
                     ExamProperties.IS_STRANGER_ENABLE.name()).getValue();
         }