|
@@ -354,12 +354,18 @@ public class FaceBiopsyServiceImpl implements FaceBiopsyService {
|
|
|
//如果第一步检测部分失败(照片非本人或检测中多人脸),需要结束考试
|
|
|
Map faceCompareResult = JsonUtil.fromJson(stepInfo.getResultJson(), Map.class);
|
|
|
if (null != faceCompareResult) {
|
|
|
- if (null == faceCompareResult.get("isStranger") || null == faceCompareResult.get("isPass") ||
|
|
|
+ if (null == faceCompareResult.get("isPass") ||
|
|
|
null == faceCompareResult.get("existsSystemError")) {
|
|
|
throw new StatusException("201007", "活体检测第一步检测结果的json串格式不正确");
|
|
|
}
|
|
|
|
|
|
- Boolean isStranger = Boolean.valueOf(faceCompareResult.get("isStranger").toString());
|
|
|
+ Boolean isStranger;
|
|
|
+ if (null == faceCompareResult.get("isStranger")) {
|
|
|
+ isStranger = false;
|
|
|
+ } else {
|
|
|
+ isStranger = Boolean.valueOf(faceCompareResult.get("isStranger").toString());
|
|
|
+ }
|
|
|
+
|
|
|
Boolean isPass = Boolean.valueOf(faceCompareResult.get("isPass").toString());
|
|
|
Boolean existsSystemError = Boolean.valueOf(faceCompareResult.get("existsSystemError").toString());
|
|
|
//case1.1.有陌生人(即多人脸),不管是否比对成功,直接结束考试
|