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

---
 src/test/java/com/hxh/spring/test/PPTVTest.java |   49 ++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/src/test/java/com/hxh/spring/test/PPTVTest.java b/src/test/java/com/hxh/spring/test/PPTVTest.java
index e7d9bcf..77a1bf1 100644
--- a/src/test/java/com/hxh/spring/test/PPTVTest.java
+++ b/src/test/java/com/hxh/spring/test/PPTVTest.java
@@ -1,16 +1,18 @@
 package com.hxh.spring.test;
 
+import com.google.gson.Gson;
+import com.yeshi.buwan.dao.juhe.pptv.PPTVProgramDao;
 import com.yeshi.buwan.dao.juhe.pptv.PPTVSeriesDao;
 import com.yeshi.buwan.dao.juhe.pptv.PPTVSeriesProgramMapDao;
+import com.yeshi.buwan.dao.juhe.pptv.VideoPPTVMapDao;
 import com.yeshi.buwan.job.video.PPTVVideoUpdate;
-import com.yeshi.buwan.pptv.PPTVApiUtil;
-import com.yeshi.buwan.pptv.PPTVUtil;
-import com.yeshi.buwan.pptv.entity.PPTVSeries;
-import com.yeshi.buwan.pptv.entity.PPTVSeriesProgramMap;
+import com.yeshi.buwan.videos.pptv.PPTVApiUtil;
+import com.yeshi.buwan.videos.pptv.entity.PPTVSeries;
+import com.yeshi.buwan.videos.pptv.entity.PPTVSeriesProgramMap;
+import com.yeshi.buwan.videos.pptv.entity.VideoPPTVMap;
 import com.yeshi.buwan.service.inter.LoginUserService;
 import com.yeshi.buwan.service.inter.juhe.PPTVService;
 import com.yeshi.buwan.util.StringUtil;
-import com.yeshi.buwan.util.log.LoggerUtil;
 import jxl.Sheet;
 import jxl.Workbook;
 import jxl.write.Label;
@@ -45,8 +47,15 @@
     @Resource
     private PPTVSeriesDao pptvSeriesDao;
 
+
+    @Resource
+    private PPTVProgramDao pptvProgramDao;
+
     @Resource
     private PPTVSeriesProgramMapDao pptvSeriesProgramMapDao;
+
+    @Resource
+    private VideoPPTVMapDao videoPPTVMapDao;
 
 
     @Resource
@@ -69,8 +78,34 @@
 //                continue;
 //            }
 //            System.out.println(s.getName() + ":" + s.getInfoID());
-            PPTVSeries series = pptvService.getSeriesDetail("381096");
-            pptvService.addToVideoInfo(series);
+
+        Query query = new Query();
+        query.addCriteria(new Criteria().orOperator(Criteria.where("programType").regex("鐢靛奖"), Criteria.where("programType2").regex("鐢靛奖")));
+
+        List<String> list = new ArrayList<>();
+
+        List<PPTVSeries> seriesList = pptvSeriesDao.findList(query);
+        for (PPTVSeries series : seriesList) {
+            VideoPPTVMap map = pptvService.selectVideoPPTVMapByPPInfo(series.getInfoID(), null);
+
+            if (map != null && map.getProgramCode() == null) {
+                series = pptvService.getSeriesDetail(series.getInfoID());
+                map.setSeriesCode(series.getSeriesCode());
+                map.setProgramCode(series.getSeries().get(0).getProgramCode());
+                videoPPTVMapDao.save(map);
+            } else {
+                if (map == null) {
+                    list.add(series.getInfoID());
+//                    series = PPTVApiUtil.getDetail(series.getSeriesCode());
+                    series = pptvService.getSeriesDetail(series.getInfoID());
+                    pptvService.addToVideoInfo(series);
+                }
+            }
+        }
+
+        System.out.println(new Gson().toJson(list));
+
+
 //        }
     }
 

--
Gitblit v1.8.0