Browse Source

人脸核身

he2802 3 years ago
parent
commit
d7aa9d95b4

+ 9 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/tencentcloud/service/impl/FaceOcrServiceImpl.java

@@ -25,6 +25,7 @@ import com.zhongzheng.modules.tencentcloud.bo.FaceQueryBo;
 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.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -60,25 +61,25 @@ public class FaceOcrServiceImpl implements IFaceOcrService {
             if(Validator.isEmpty(bo.getOrderGoodsId())){
                 throw new CustomException("缺少参数");
             }
-           /* UserVo userVo = iUserService.queryById(bo.getUserId());
+           UserVo userVo = iUserService.queryById(bo.getUserId());
             if(Validator.isEmpty(userVo)){
                 return 0;
-            }*/
-            UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
+            }
+           /* UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
             userProfileQueryBo.setUserId(bo.getUserId());
             userProfileQueryBo.setOrderGoodsId(bo.getOrderGoodsId());
             userProfileQueryBo.setTypeStatus(1L);
-            UserProfileVo info = iUserProfileService.getInfo(userProfileQueryBo);
+            UserProfileVo info = iUserProfileService.getInfo(userProfileQueryBo);*/
 
-            if(Validator.isEmpty(info)){
+            if(Validator.isEmpty(userVo.getOneInchPhotos())){
                 //没有无需匹配
                 return 101;
             }
-            Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(),Map.class);
+    //        Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(),Map.class);
 
-            String oneInchPhotos = JSONObject.parseObject(String.valueOf(maps.get("recent_photos")), UserProfileFit.class).getValue(); //一寸照片
+    //        String oneInchPhotos = JSONObject.parseObject(String.valueOf(maps.get("recent_photos")), UserProfileFit.class).getValue(); //审核资料一寸照片
 
-            oneInchPhotos =ossHost+"/"+oneInchPhotos;
+            String oneInchPhotos =ossHost+"/"+userVo.getOneInchPhotos();
             Credential cred = new Credential(SecretId, SecretKey);
             ClientProfile clientProfile = new ClientProfile();
             clientProfile.setSignMethod(clientProfile.SIGN_TC3_256);