he2802 4 anos atrás
pai
commit
ff1b996464

+ 0 - 3
zhongzheng-api/src/main/java/com/zhongzheng/controller/collect/CollectCourseController.java

@@ -48,9 +48,6 @@ public class CollectCourseController extends BaseController {
 
 
     private final WxTokenService wxTokenService;
     private final WxTokenService wxTokenService;
 
 
-
-
-
     /**
     /**
      * 获取收藏课程详细信息
      * 获取收藏课程详细信息
      */
      */

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/face/service/IFaceService.java

@@ -11,4 +11,6 @@ public interface IFaceService {
 
 
     FaceVo getPicFaceDetectAuth(String RuleId,Long userId);
     FaceVo getPicFaceDetectAuth(String RuleId,Long userId);
 
 
+    void getPicDetectInfo(String bizToken,Long userId);
+
 }
 }

+ 18 - 4
zhongzheng-system/src/main/java/com/zhongzheng/modules/face/service/impl/FaceServiceImpl.java

@@ -8,10 +8,7 @@ import com.tencentcloudapi.common.exception.TencentCloudSDKException;
 import com.tencentcloudapi.common.profile.ClientProfile;
 import com.tencentcloudapi.common.profile.ClientProfile;
 import com.tencentcloudapi.common.profile.HttpProfile;
 import com.tencentcloudapi.common.profile.HttpProfile;
 import com.tencentcloudapi.faceid.v20180301.FaceidClient;
 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.DateUtils;
 import com.zhongzheng.common.utils.file.ImageUtils;
 import com.zhongzheng.common.utils.file.ImageUtils;
 import com.zhongzheng.modules.alioss.service.OssService;
 import com.zhongzheng.modules.alioss.service.OssService;
@@ -172,5 +169,22 @@ public class FaceServiceImpl implements IFaceService {
         return null;
         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());
+        }
+    }
+
 
 
 }
 }

+ 3 - 3
zhongzheng-system/src/main/resources/mapper/modules/collect/CollectCourseMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zhongzheng.system.mapper.CollectCourseMapper">
+<mapper namespace="com.zhongzheng.modules.collect.mapper.CollectCourseMapper">
 
 
-    <resultMap type="com.zhongzheng.system.domain.CollectCourse" id="CollectCourseResult">
+    <resultMap type="com.zhongzheng.modules.collect.domain.CollectCourse" id="CollectCourseResult">
         <result property="collectCourseId" column="collect_course_id"/>
         <result property="collectCourseId" column="collect_course_id"/>
         <result property="courseId" column="course_id"/>
         <result property="courseId" column="course_id"/>
         <result property="userId" column="user_id"/>
         <result property="userId" column="user_id"/>
@@ -12,4 +12,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     </resultMap>
 
 
 
 
-</mapper>
+</mapper>