瀏覽代碼

update fix

deason 2 年之前
父節點
當前提交
f1bd55ee3c

+ 7 - 1
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/impl/ExamRecordDataServiceImpl.java

@@ -143,9 +143,15 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
                         log.error("当前人脸比对处理失败!examRecordDataId:{}, error:{}", examRecordData.getId(), e.getMessage());
                     }
 
-                    throw new StatusException(Constants.CAPTURE_PROCESSING_STATUS_CODE, "抓拍照片比对尚未处理完!");
+                    throw new StatusException(Constants.CAPTURE_PROCESSING_STATUS_CODE, "抓拍照片比对处理异常,稍后重试!");
                 } finally {
                     SequenceLockHelper.releaseLockSimple(lockKey);
+
+                    // 再次检查是否存在未处理完记录
+                    queueSize = examCaptureQueueRepo.countByExamRecordDataId(examRecordData.getId());
+                    if (queueSize > 0) {
+                        throw new StatusException(Constants.CAPTURE_PROCESSING_STATUS_CODE, "抓拍照片比对尚未处理完,稍后重试!");
+                    }
                 }
             }