|
@@ -41,6 +41,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Objects;
|
|
|
import java.util.UUID;
|
|
|
+import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
/**
|
|
|
* @Description: mq执行逻辑 impl
|
|
@@ -363,12 +364,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setRealnessErrorRandom(recordId, realnessErrorRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil
|
|
|
- .setRealnessErrorNum(recordId, ExamRecordCacheUtil.getRealnessErrorNum(recordId) + 1);
|
|
|
+ .setRealnessErrorNum(recordId, ExamRecordCacheUtil.getRealnessErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(realnessErrorRandom);
|
|
|
faceVerifyHistoryService
|
|
|
.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception,
|
|
|
realnessErrorRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getRealnessErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getRealnessErrorNum(recordId).get();
|
|
|
if (count > teConfig.getRealnessCount()) {
|
|
|
ExamRecordCacheUtil.setRealnessErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
@@ -388,12 +389,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorRandom(recordId, multipleFaceRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorNum(recordId,
|
|
|
- ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId) + 1);
|
|
|
+ ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(multipleFaceRandom);
|
|
|
faceVerifyHistoryService
|
|
|
.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception,
|
|
|
multipleFaceRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId).get();
|
|
|
if (count > teConfig.getMultipleFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
@@ -407,12 +408,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorRandom(recordId, noFaceRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorNum(recordId,
|
|
|
- ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId) + 1);
|
|
|
+ ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(noFaceRandom);
|
|
|
faceVerifyHistoryService
|
|
|
.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception,
|
|
|
noFaceRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId).get();
|
|
|
if (count > teConfig.getNoFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
@@ -427,12 +428,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorRandom(recordId, faceCompareErrorRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil
|
|
|
- .setFaceCompareErrorNum(recordId, ExamRecordCacheUtil.getFaceCompareErrorNum(recordId) + 1);
|
|
|
+ .setFaceCompareErrorNum(recordId, ExamRecordCacheUtil.getFaceCompareErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(faceCompareErrorRandom);
|
|
|
faceVerifyHistoryService
|
|
|
.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception,
|
|
|
faceCompareErrorRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getFaceCompareErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getFaceCompareErrorNum(recordId).get();
|
|
|
if (count > teConfig.getTotalFaceCompareErrorCount()) {
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
@@ -446,12 +447,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setEyeCloseErrorRandom(recordId, eyeCloseErrorRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil
|
|
|
- .setEyeCloseErrorNum(recordId, ExamRecordCacheUtil.getEyeCloseErrorNum(recordId) + 1);
|
|
|
+ .setEyeCloseErrorNum(recordId, ExamRecordCacheUtil.getEyeCloseErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(eyeCloseErrorRandom);
|
|
|
faceVerifyHistoryService
|
|
|
.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception,
|
|
|
eyeCloseErrorRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getEyeCloseErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getEyeCloseErrorNum(recordId).get();
|
|
|
if (count > teConfig.getTotalEyeCloseErrorCount()) {
|
|
|
ExamRecordCacheUtil.setEyeCloseErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
@@ -538,12 +539,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorRandom(recordId, multipleFaceRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorNum(recordId,
|
|
|
- ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId) + 1);
|
|
|
+ ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(multipleFaceRandom);
|
|
|
livenessVerifyHistoryService
|
|
|
.save(id, recordId, type, actions, retry, startTime, finishTime, exception,
|
|
|
multipleFaceRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId).get();
|
|
|
if (count > teConfig.getMultipleFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
@@ -557,12 +558,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorRandom(recordId, noFaceRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorNum(recordId,
|
|
|
- ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId) + 1);
|
|
|
+ ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(noFaceRandom);
|
|
|
livenessVerifyHistoryService
|
|
|
.save(id, recordId, type, actions, retry, startTime, finishTime, exception,
|
|
|
noFaceRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId).get();
|
|
|
if (count > teConfig.getNoFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
@@ -579,12 +580,12 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorRandom(recordId, faceCompareErrorRandom);
|
|
|
}
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorNum(recordId,
|
|
|
- ExamRecordCacheUtil.getFaceCompareErrorNum(recordId) + 1);
|
|
|
+ ExamRecordCacheUtil.getFaceCompareErrorNum(recordId).incrementAndGet());
|
|
|
warningDto.setRandom(faceCompareErrorRandom);
|
|
|
livenessVerifyHistoryService
|
|
|
.save(id, recordId, type, actions, retry, startTime, finishTime, exception,
|
|
|
faceCompareErrorRandom);
|
|
|
- Integer count = ExamRecordCacheUtil.getFaceCompareErrorNum(recordId);
|
|
|
+ Integer count = ExamRecordCacheUtil.getFaceCompareErrorNum(recordId).get();
|
|
|
if (count > teConfig.getTotalFaceCompareErrorCount()) {
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorRandom(recordId,
|
|
|
String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|