he2802 1 年之前
父節點
當前提交
c4dfd0625e

+ 6 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/tencentcloud/service/impl/FaceOcrServiceImpl.java

@@ -26,6 +26,8 @@ import com.zhongzheng.modules.tencentcloud.bo.InvoiceQueryBo;
 import com.zhongzheng.modules.tencentcloud.service.IFaceOcrService;
 import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.vo.UserVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -54,7 +56,7 @@ public class FaceOcrServiceImpl implements IFaceOcrService {
     @Autowired
     private IUserProfileService iUserProfileService;
 
-
+    private static Logger log = LoggerFactory.getLogger(FaceOcrServiceImpl.class);
     /**
      * 学习拍照比对
      * @param bo
@@ -116,12 +118,15 @@ public class FaceOcrServiceImpl implements IFaceOcrService {
             DetectFaceResponse response = iaiClient.DetectFace(faceRequest);
             FaceInfo[] face = response.getFaceInfos();
             if(face[0].getFaceQualityInfo().getBrightness().intValue()<30){
+                log.info("照片光照不达标"+face[0].getFaceQualityInfo().getBrightness().intValue());
                 throw new CustomException("照片光照不达标"+face[0].getFaceQualityInfo().getBrightness().intValue());
             }
             if(face[0].getFaceQualityInfo().getScore().intValue()<40){
+                log.info("照片质量不达标"+face[0].getFaceQualityInfo().getScore().intValue());
                 throw new CustomException("照片质量不达标"+face[0].getFaceQualityInfo().getScore().intValue());
             }
             if(Validator.isEmpty(face[0].getFaceQualityInfo().getCompleteness())){
+                log.info("照片五官不达标");
                 throw new CustomException("照片五官不达标");
             }
         }catch (TencentCloudSDKException e){