|
|
@@ -8,10 +8,7 @@ import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
|
|
import com.tencentcloudapi.common.profile.ClientProfile;
|
|
|
import com.tencentcloudapi.common.profile.HttpProfile;
|
|
|
import com.tencentcloudapi.faceid.v20180301.FaceidClient;
|
|
|
-import com.tencentcloudapi.faceid.v20180301.models.DetectAuthRequest;
|
|
|
-import com.tencentcloudapi.faceid.v20180301.models.DetectAuthResponse;
|
|
|
-import com.tencentcloudapi.faceid.v20180301.models.GetDetectInfoRequest;
|
|
|
-import com.tencentcloudapi.faceid.v20180301.models.GetDetectInfoResponse;
|
|
|
+import com.tencentcloudapi.faceid.v20180301.models.*;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.file.ImageUtils;
|
|
|
import com.zhongzheng.modules.alioss.service.OssService;
|
|
|
@@ -172,5 +169,22 @@ public class FaceServiceImpl implements IFaceService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void getPicDetectInfo(String bizToken, Long userId) {
|
|
|
+ try{
|
|
|
+ Credential cred = new Credential(SecretId, SecretKey);
|
|
|
+ HttpProfile httpProfile = new HttpProfile();
|
|
|
+ httpProfile.setEndpoint("faceid.tencentcloudapi.com");
|
|
|
+ ClientProfile clientProfile = new ClientProfile();
|
|
|
+ clientProfile.setHttpProfile(httpProfile);
|
|
|
+ FaceidClient client = new FaceidClient(cred, "", clientProfile);
|
|
|
+ ImageRecognitionRequest req = new ImageRecognitionRequest();
|
|
|
+ ImageRecognitionResponse resp = client.ImageRecognition(req);
|
|
|
+ System.out.println(ImageRecognitionResponse.toJsonString(resp));
|
|
|
+ } catch (TencentCloudSDKException e) {
|
|
|
+ System.out.println(e.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|