瀏覽代碼

Merge branch '20250625_wyp_shareUrlLink' of Server/growth-manager into master

wangyunpeng 1 周之前
父節點
當前提交
0136dd6cdc

+ 15 - 0
api-module/src/main/java/com/tzld/piaoquan/api/component/VlogApiService.java

@@ -15,6 +15,7 @@ public class VlogApiService {
     private HttpPoolClient httpPoolClient;
 
     private final static String SHARE_IMG_URL = "https://vlogapi.piaoquantv.com/longvideoapi/video/share/web/qrImg";
+    private final static String SHARE_LINK_URL = "https://vlogapi.piaoquantv.com/longvideoapi/video/share/web/link";
 
     public String getSharePic(String path, String appType) {
         JSONObject requestParam = new JSONObject();
@@ -29,4 +30,18 @@ public class VlogApiService {
         }
         return null;
     }
+
+    public String getShareUrlLink(String path, String appType) {
+        JSONObject requestParam = new JSONObject();
+        requestParam.put("page", path);
+        requestParam.put("appType", appType);
+        try {
+            String resultStr = httpPoolClient.post(SHARE_LINK_URL, requestParam.toJSONString());
+            JSONObject result = JSON.parseObject(resultStr);
+            return result.getString("data");
+        } catch (Exception e) {
+            log.error("获取分享链接失败", e);
+        }
+        return null;
+    }
 }

+ 13 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformPlanController.java

@@ -93,10 +93,23 @@ public class ContentPlatformPlanController {
 
     @ApiOperation(value = "获取分享二维码")
     @GetMapping("/qw/getSharePic")
+    public CommonResponse<String> getQwSharePic(@RequestParam String pageUrl) {
+        return CommonResponse.success(planService.getSharePic(pageUrl));
+    }
+
+    @ApiOperation(value = "获取分享二维码")
+    @GetMapping("/getSharePic")
     public CommonResponse<String> getSharePic(@RequestParam String pageUrl) {
         return CommonResponse.success(planService.getSharePic(pageUrl));
     }
 
+    @ApiOperation(value = "获取分享链接")
+    @GetMapping("/getShareUrlLink")
+    @JwtIgnore
+    public CommonResponse<String> getShareUrlLink(@RequestParam String pageUrl) {
+        return CommonResponse.success(planService.getShareUrlLink(pageUrl));
+    }
+
     @ApiOperation(value = "同步最近top1000视频", hidden = true)
     @JwtIgnore
     @GetMapping("/job/syncContentPlatformVideoJob")

+ 2 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformPlanService.java

@@ -42,6 +42,8 @@ public interface ContentPlatformPlanService {
 
     String getSharePic(String pageUrl);
 
+    String getShareUrlLink(String pageUrl);
+
     List<ContentPlatformGzhPlan> getGzhPlanListByCooperateAccountId(Long accountId);
 
     List<ContentPlatformGzhPlan> getGzhPlanListByCreateAccountId(Long createAccountId);

+ 5 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -707,6 +707,11 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         return vlogApiService.getSharePic(pageUrl, shareAppType);
     }
 
+    @Override
+    public String getShareUrlLink(String pageUrl) {
+        return vlogApiService.getShareUrlLink(pageUrl, shareAppType);
+    }
+
     @Override
     public List<ContentPlatformGzhPlanVideo> getGzhPlanVideoListByCooperateAccountId(String ghId) {
         return planMapperExt.getGzhPlanVideoListByCooperateAccountId(ghId);