|
|
@@ -115,7 +115,7 @@ public class NotaryDomainImpl implements NotaryDomain {
|
|
|
if (thirdPartyInterfaceEntity.getResult()==1){
|
|
|
UserAXQInfoEntity userAxq = new UserAXQInfoEntity();
|
|
|
userAxq.setId(userAXQInfoEntity.getId());
|
|
|
- userAxq.setCompareImgId(fileInfo.getId());
|
|
|
+ userAxq.setFaceCompareId(thirdPartyInterfaceEntity.getId());
|
|
|
userAXQInfoMapper.updateById(userAxq);
|
|
|
log.info("当事人人脸核身通过");
|
|
|
thirdPartyInterfaceRepository.insert(thirdPartyInterfaceEntity);
|
|
|
@@ -187,6 +187,7 @@ public class NotaryDomainImpl implements NotaryDomain {
|
|
|
FileInfoEntity fileInfo = saveCompareImage(base);
|
|
|
fileInfoMapper.insert(fileInfo);
|
|
|
|
|
|
+ ThirdPartyInterfaceEntity thirdParty = null;
|
|
|
boolean redisFlag = (count != null && count >= 2);
|
|
|
if (flag) {
|
|
|
//说明是客户经理
|
|
|
@@ -212,7 +213,16 @@ public class NotaryDomainImpl implements NotaryDomain {
|
|
|
}
|
|
|
} else {
|
|
|
//说明是当事人
|
|
|
- if (userAXQInfoEntity.getCompareImgId() == null || redisFlag) {
|
|
|
+ Long faceCompareId = userAXQInfoEntity.getFaceCompareId();
|
|
|
+ QueryWrapper<ThirdPartyInterfaceEntity> thirdPartyInterfaceEntityQueryWrapper = new QueryWrapper<>();
|
|
|
+ if (ObjectUtils.isEmpty(faceCompareId)){
|
|
|
+ thirdPartyInterfaceEntityQueryWrapper.eq("business_no",compareImageDomain.getBusinessNo()).eq("res","1");
|
|
|
+ }else {
|
|
|
+ thirdPartyInterfaceEntityQueryWrapper.eq("business_no",compareImageDomain.getBusinessNo()).eq("res","1").eq("id",faceCompareId);
|
|
|
+ }
|
|
|
+ thirdPartyInterfaceEntityQueryWrapper.eq("business",compareImageDomain.getBusinessNo()).eq("res","1");
|
|
|
+ thirdParty = thirdPartyInterfaceRepository.getOne(thirdPartyInterfaceEntityQueryWrapper);
|
|
|
+ if (ObjectUtils.isEmpty(thirdParty) || redisFlag) {
|
|
|
//说明当事人需要做人脸核身
|
|
|
ThirdPartyInterfaceEntity thirdPartyInterfaceEntity = JuheServiceUtil.URLPost(idCard, nickName, base64);
|
|
|
thirdPartyInterfaceEntity.setFileId(fileInfo.getId()+"");
|
|
|
@@ -221,7 +231,7 @@ public class NotaryDomainImpl implements NotaryDomain {
|
|
|
//上传图片到minio FileInfo
|
|
|
UserAXQInfoEntity userAxq = new UserAXQInfoEntity();
|
|
|
userAxq.setId(userAXQInfoEntity.getId());
|
|
|
- userAxq.setCompareImgId(fileInfo.getId());
|
|
|
+ userAxq.setFaceCompareId(thirdPartyInterfaceEntity.getId());
|
|
|
userAXQInfoMapper.updateById(userAxq);
|
|
|
log.info("当事人人脸核身通过");
|
|
|
redis.del(redisCount);
|
|
|
@@ -240,10 +250,14 @@ public class NotaryDomainImpl implements NotaryDomain {
|
|
|
id = sysUserEntity.getCompareImgId();
|
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(userAXQInfoEntity)) {
|
|
|
- id = userAXQInfoEntity.getCompareImgId();
|
|
|
+ if (!ObjectUtils.isEmpty(thirdParty)){
|
|
|
+ id = Integer.parseInt(thirdParty.getFileId());
|
|
|
+ }
|
|
|
}
|
|
|
- if (! compareImage(base, id,redisCount,count)) {
|
|
|
- return ResultCode.LIVE_VIDEO_INVALID;
|
|
|
+ if (!ObjectUtils.isEmpty(id)){
|
|
|
+ if (! compareImage(base, id,redisCount,count)) {
|
|
|
+ return ResultCode.LIVE_VIDEO_INVALID;
|
|
|
+ }
|
|
|
}
|
|
|
if (count != null) {
|
|
|
redis.del(redisCount);
|