From f537abe9f3646c739beaf15076246a2f71a347e9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 20 二月 2025 16:57:55 +0800
Subject: [PATCH] IOS广告增加区域屏蔽

---
 src/main/java/com/yeshi/buwan/job/video/FunTV2VideoUpdate.java |  118 ++++++++++-------------------------------------------------
 1 files changed, 20 insertions(+), 98 deletions(-)

diff --git a/src/main/java/com/yeshi/buwan/job/video/FunTV2VideoUpdate.java b/src/main/java/com/yeshi/buwan/job/video/FunTV2VideoUpdate.java
index 7fdf270..67630da 100644
--- a/src/main/java/com/yeshi/buwan/job/video/FunTV2VideoUpdate.java
+++ b/src/main/java/com/yeshi/buwan/job/video/FunTV2VideoUpdate.java
@@ -2,23 +2,13 @@
 
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
-import com.yeshi.buwan.funtv.FunTVNewApi;
-import com.yeshi.buwan.funtv.entity.FunTVAlbum2;
-import com.yeshi.buwan.funtv.entity.FunTVShortVideo2;
-import com.yeshi.buwan.funtv.entity.FunTVVideo2;
-import com.yeshi.buwan.iqiyi.IqiYiNewAPI;
-import com.yeshi.buwan.iqiyi.util.IqiyiUtil2;
 import com.yeshi.buwan.service.inter.juhe.FunTV2Service;
-import com.yeshi.buwan.service.inter.juhe.Iqiyi2Service;
-import com.yeshi.buwan.util.StringUtil;
-import com.yeshi.buwan.util.mq.CMQManager;
-import com.yeshi.buwan.vo.video.funtv.Funtv2ResultVO;
+import com.yeshi.buwan.videos.funtv.entity.FunTVShortVideo2;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -39,44 +29,6 @@
      */
     @XxlJob("video-update-funtv2-updateLatestVideo")
     public ReturnT<String> updateLatestVideo(String param) throws Exception {
-        int d = 1;
-        if (!StringUtil.isNullOrEmpty(param))
-            d = Integer.parseInt(param);
-        //鑾峰彇鏈�杩�1澶╃殑涓撹緫
-        List<FunTVAlbum2> list = getLatestAlbum(d);
-        for (FunTVAlbum2 album2 : list) {
-            funTV2Service.saveAlbum(album2);
-            if (album2.getEpisodes() != null)
-                for (FunTVVideo2 video2 : album2.getEpisodes())
-                    funTV2Service.saveVideo(video2);
-            CMQManager.getInstance().addFunTVAlbumUpdateMsg(album2.getId());
-        }
-
-        //鑾峰彇鏈�杩戜竴澶╃殑鐭棰�
-        List<FunTVShortVideo2> shortVideo2List = getLatestShortVideo(d);
-        if (shortVideo2List != null)
-            for (FunTVShortVideo2 video2 : shortVideo2List)
-                funTV2Service.saveShortVideo(video2);
-        return ReturnT.SUCCESS;
-    }
-
-
-    /**
-     * 鏍规嵁涓撹緫ID鏇存柊
-     * @param param
-     * @return
-     * @throws Exception
-     */
-    @XxlJob("video-update-funtv2-updateAlbumById")
-    public ReturnT<String> updateAlbumById(String param) throws Exception {
-        FunTVAlbum2 album2 = FunTVNewApi.getAlbumsDetail(param);
-        if (album2 != null) {
-            funTV2Service.saveAlbum(album2);
-            if (album2.getEpisodes() != null)
-                for (FunTVVideo2 video2 : album2.getEpisodes())
-                    funTV2Service.saveVideo(video2);
-            CMQManager.getInstance().addFunTVAlbumUpdateMsg(album2.getId());
-        }
         return ReturnT.SUCCESS;
     }
 
@@ -87,56 +39,26 @@
      */
     public List<FunTVShortVideo2> getLatestShortVideo(int d) {
         List<FunTVShortVideo2> shortVideo2List = new ArrayList<>();
-        int pageSize = 100;
-        long now = System.currentTimeMillis();
-        int page = 1;
-        int totalPage = -1;
-        while (true) {
-            Funtv2ResultVO result = FunTVNewApi.getVideos(page, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, null);
-            if (result != null) {
-                for (Serializable a : result.getList()) {
-                    FunTVShortVideo2 video2 = (FunTVShortVideo2) a;
-                    shortVideo2List.add(video2);
-                }
-            }
-            int count = result.getCount();
-            if (totalPage < 0)
-                totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1;
-            if (page > totalPage)
-                break;
-            page++;
-        }
+//        int pageSize = 100;
+//        long now = System.currentTimeMillis();
+//        int page = 1;
+//        int totalPage = -1;
+//        while (true) {
+//            Funtv2ResultVO result = FunTVNewApi.getVideos(page, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, null);
+//            if (result != null) {
+//                for (Serializable a : result.getList()) {
+//                    FunTVShortVideo2 video2 = (FunTVShortVideo2) a;
+//                    shortVideo2List.add(video2);
+//                }
+//            }
+//            int count = result.getCount();
+//            if (totalPage < 0)
+//                totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1;
+//            if (page > totalPage)
+//                break;
+//            page++;
+//        }
         return shortVideo2List;
-    }
-
-
-    /**
-     * 鑾峰彇鏈�杩戠殑涓撹緫
-     *
-     * @return
-     */
-    private List<FunTVAlbum2> getLatestAlbum(int d) {
-        List<FunTVAlbum2> funTVAlbum2List = new ArrayList<>();
-        int pageSize = 100;
-        long now = System.currentTimeMillis();
-        int page = 1;
-        int totalPage = -1;
-        while (true) {
-            Funtv2ResultVO result = FunTVNewApi.getAlbums(page, pageSize, now - 1000 * 60 * 60L * 24 * d, now - 1000 * 60 * 60L * 24 * (d - 1), null, null);
-            if (result != null) {
-                for (Serializable a : result.getList()) {
-                    FunTVAlbum2 video2 = (FunTVAlbum2) a;
-                    funTVAlbum2List.add(video2);
-                }
-            }
-            int count = result.getCount();
-            if (totalPage < 0)
-                totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1;
-            if (page > totalPage)
-                break;
-            page++;
-        }
-        return funTVAlbum2List;
     }
 
 }

--
Gitblit v1.8.0