From ad3ac53da1c3a11a96ae62d790aa61a81b9eab91 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 20 三月 2021 18:47:23 +0800
Subject: [PATCH] 完善APP首页顶部标签栏兼容,初步处理推送

---
 src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java b/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java
index 0130e55..757489f 100644
--- a/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java
+++ b/src/main/java/com/yeshi/buwan/service/imp/juhe/FunTVService.java
@@ -40,6 +40,7 @@
 
     @Resource
     private FunTVAlbumDao funTVAlbumDao;
+
     @Resource
     private FunTVAlbumVideoMapDao funTVAlbumVideoMapDao;
 
@@ -63,6 +64,9 @@
 
     @Resource
     private VideoManager videoManager;
+
+    @Resource
+    private ResourceVideoService resourceVideoService;
 
     static Logger logger = Logger.getLogger(FunTVService.class);
 
@@ -151,7 +155,7 @@
                     // 鑾峰彇鏈�鏂颁竴闆嗙殑淇℃伅
                     List<FunTVVideo> plist = funTVVideoDao.listByAid(p.getAid(), "num", Sort.Direction.DESC, 0, 1);
                     if (plist.size() > 0) {
-                        List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>();
+                        List<VideoDetailInfo> detailList = new ArrayList<>();
                         detailList.add(FunTVUtil.convertFunTVVideoToVideoDetail(plist.get(0), p));
                         vi.setVideoDetailList(detailList);
                     }
@@ -305,7 +309,7 @@
 
         final VideoInfo info = FunTVUtil.convertFunTVAlbumToVideoInfo(p);
         // 绫诲瀷璁$畻
-        final List<Integer> typeList = new ArrayList<Integer>();
+        final List<Integer> typeList = new ArrayList<>();
 
         int type = FunTVUtil.getFunTVAlbumType(p);
         boolean exist = false;
@@ -382,7 +386,7 @@
                     return;
                 } else {// 闇�瑕佹柊鍔犲叆videoinfo
                     Serializable id = addVideoInfo(info, p);
-                    List<Integer> typeList = new ArrayList<Integer>();
+                    List<Integer> typeList = new ArrayList<>();
                     typeList = FunTVUtil.getShortVideoType(p, p.getCate(), p.getSubCate());
 
                     if (typeList == null || typeList.size() <= 0)
@@ -472,7 +476,9 @@
             if (vft != null && vft.getAid() != null) {// 鎸夎妭鐩煡鎵捐棰�
                 String aid = vft.getAid();
                 FunTVAlbum album = funTVAlbumDao.get(aid);
-
+                if (album == null) {
+                    resourceVideoService.delete(videoid, FunTVUtil.RESOURCE_ID + "");
+                }
                 final String type = album.getVideoType();
                 Sort.Direction sort = Sort.Direction.ASC;
                 if (type != null)
@@ -501,14 +507,14 @@
                 return detailList;
             } else if (vft.getVid() != null) {// 鍗曚釜瑙嗛
                 FunTVVideo pv = funTVVideoDao.get(vft.getVid());
-                List<VideoDetailInfo> detailList = new ArrayList<VideoDetailInfo>();
+                List<VideoDetailInfo> detailList = new ArrayList<>();
                 VideoDetailInfo detail = new VideoDetailInfo();
                 detail.setId(Long.parseLong(pv.getVid()));
                 detail.setExtraId(pv.getId() + "");
                 detail.setName(pv.getTitle());
                 detail.setTag(pv.getDesc());
                 detail.setType("funtvvideo");
-                List<VideoUrl> urlList = new ArrayList<VideoUrl>();
+                List<VideoUrl> urlList = new ArrayList<>();
                 VideoUrl vu = new VideoUrl();
                 vu.setAdmin(null);
                 vu.setBaseUrl(pv.getPlayUrl());
@@ -520,6 +526,8 @@
                 detailList.add(detail);
                 return detailList;
             }
+        }else{//鍒犻櫎鏉ユ簮
+            resourceVideoService.delete(videoid,FunTVUtil.RESOURCE_ID+"");
         }
 
         return null;

--
Gitblit v1.8.0