|
@@ -20,6 +20,9 @@ import cn.com.qmth.examcloud.core.oe.admin.service.ExamCaptureService;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examcapture.ExamCaptureAuditInfo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.bean.examcapture.ExamCaptureInfo;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.others.ExamCacheTransferHelper;
|
|
|
+import cn.com.qmth.examcloud.support.Constants;
|
|
|
+import cn.com.qmth.examcloud.support.cache.CacheHelper;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
|
|
|
import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
|
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
|
import com.google.common.collect.Lists;
|
|
@@ -202,7 +205,15 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
|
|
|
JSONObject resultJson = jsonObject.getJSONObject("result");
|
|
|
if(resultJson.has("face_liveness")){
|
|
|
double faceLivenessVal = resultJson.getDouble("face_liveness");
|
|
|
- double baiduFacelivenessThreshold = Double.parseDouble(PropertyHolder.getString("$baidu.faceliveness.threshold"));
|
|
|
+
|
|
|
+ Double baiduFacelivenessThreshold;
|
|
|
+ SysPropertyCacheBean baiduFacelivenessThresholdProperty = CacheHelper.getSysProperty("$baidu.faceliveness.threshold");
|
|
|
+ if (!baiduFacelivenessThresholdProperty.getHasValue()) {
|
|
|
+ baiduFacelivenessThreshold = Constants.DEFAULT_BAIDU_FACELIVENESS_THRESHOLD;
|
|
|
+ } else {
|
|
|
+ baiduFacelivenessThreshold = Double.valueOf(baiduFacelivenessThresholdProperty.getValue().toString());
|
|
|
+ }
|
|
|
+
|
|
|
if(faceLivenessVal > baiduFacelivenessThreshold){
|
|
|
return true;
|
|
|
}
|