zhaotx 1 год назад
Родитель
Сommit
72552ba6ac

+ 2 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/controller/FeishuController.java

@@ -59,7 +59,8 @@ public class FeishuController {
 //    dianzhongConfigService.pullMovieInfo("2025-08-08", 78012L);
 //    dianzhongConfigService.pullMovieInfo("2025-08-08", 78012L);
 //        dianzhongConfigService.pullChannelInfo();
 //        dianzhongConfigService.pullChannelInfo();
 //        dianzhongConfigService.pullMovieInfo(str);
 //        dianzhongConfigService.pullMovieInfo(str);
-        dianzhongConfigService.pullMovie();
+//        dianzhongConfigService.pullMovie();
+    dianzhongConfigService.syncPromoteLinkInfo();
     }
     }
 
 
 
 

+ 2 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/IDianzhongConfigService.java

@@ -12,4 +12,6 @@ public interface IDianzhongConfigService {
     void pullChannelInfo();
     void pullChannelInfo();
 
 
     void pullMovie() throws IOException;
     void pullMovie() throws IOException;
+
+    void syncPromoteLinkInfo();
 }
 }

+ 14 - 3
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/DianzhongConfigServiceImpl.java

@@ -6,6 +6,7 @@ import cn.com.ctop.job.bytedance.data.entity.DianzhongMovieConfig;
 import cn.com.ctop.job.bytedance.data.mapper.DianzhongConfigMapper;
 import cn.com.ctop.job.bytedance.data.mapper.DianzhongConfigMapper;
 import cn.com.ctop.job.bytedance.data.service.IDianzhongConfigService;
 import cn.com.ctop.job.bytedance.data.service.IDianzhongConfigService;
 import cn.com.ctop.job.bytedance.data.utils.HttpUtils;
 import cn.com.ctop.job.bytedance.data.utils.HttpUtils;
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
@@ -86,7 +87,17 @@ public class DianzhongConfigServiceImpl implements IDianzhongConfigService {
 
 
     @Override
     @Override
     public void pullMovie() throws IOException {
     public void pullMovie() throws IOException {
-        pullMoviePage(0, 100);
+        pullMoviePage(1100, 100);
+    }
+
+    @Override
+    public void syncPromoteLinkInfo() {
+        try {
+            String url = "https://api.deepthink.artlinkworld.cn/dianzhong/syncAll";
+            String s = HttpUtils.httpPostRequest(url, null, null);
+        }catch (Exception ignored){
+
+        }
     }
     }
 
 
     private void pullMoviePage(int offset, int limit) throws IOException {
     private void pullMoviePage(int offset, int limit) throws IOException {
@@ -102,7 +113,7 @@ public class DianzhongConfigServiceImpl implements IDianzhongConfigService {
             String res = HttpUtils.httpGet(url, null, headers);
             String res = HttpUtils.httpGet(url, null, headers);
             if (StringUtils.isNotEmpty(res)){
             if (StringUtils.isNotEmpty(res)){
                 pullMovieInfo(res);
                 pullMovieInfo(res);
-                if (offset <=100){ //每次只拉最近300个
+                if (offset < 2000){ //每次只拉最近300个
                     pullMoviePage(offset+limit, limit);
                     pullMoviePage(offset+limit, limit);
                 }
                 }
             }
             }
@@ -111,7 +122,7 @@ public class DianzhongConfigServiceImpl implements IDianzhongConfigService {
 
 
     @Override
     @Override
     public void pullMovieInfo(String str) throws IOException {
     public void pullMovieInfo(String str) throws IOException {
-        JSONObject res = JSONArray.parseObject(str);
+        JSONObject res = JSON.parseObject(str);
         JSONArray rows = res.getJSONArray("rows");
         JSONArray rows = res.getJSONArray("rows");
         if (rows==null || rows.isEmpty()){
         if (rows==null || rows.isEmpty()){
             return;
             return;

+ 5 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/DianzhongConfigJob.java

@@ -31,4 +31,9 @@ public class DianzhongConfigJob {
             FeishuRobotUtil.sendTextToWebhook("点众短剧同步失败", hook_url);
             FeishuRobotUtil.sendTextToWebhook("点众短剧同步失败", hook_url);
         }
         }
     }
     }
+
+    @XxlJob("pullDianzhongPromoteList")
+    public void pullDianzhongPromoteList(){
+        dianzhongConfigService.syncPromoteLinkInfo();
+    }
 }
 }