From f788607ff771a47bc60d6a86e00b3433c40f3d2c Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 24 九月 2021 15:22:03 +0800
Subject: [PATCH] 接入视频直播

---
 src/main/java/com/yeshi/buwan/service/imp/live/TVLiveCategoryChannelServiceImpl.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/yeshi/buwan/service/imp/live/TVLiveCategoryChannelServiceImpl.java b/src/main/java/com/yeshi/buwan/service/imp/live/TVLiveCategoryChannelServiceImpl.java
index 238eabb..b7bf6dd 100644
--- a/src/main/java/com/yeshi/buwan/service/imp/live/TVLiveCategoryChannelServiceImpl.java
+++ b/src/main/java/com/yeshi/buwan/service/imp/live/TVLiveCategoryChannelServiceImpl.java
@@ -49,7 +49,7 @@
     @Override
     public List<TVLiveChannel> listChannelByCid(String cid, String nameKey, int page, int pageSize) {
         //鏌ヨMap
-        List<TVLiveCategoryChannelMap> mapList = tvLiveCategoryChannelMapDao.listByCid(cid, (page-1)*pageSize, pageSize);
+        List<TVLiveCategoryChannelMap> mapList = tvLiveCategoryChannelMapDao.listByCid(cid, (page - 1) * pageSize, pageSize);
         if (mapList == null || mapList.size() == 0)
             return null;
         List<String> cids = new ArrayList<>();
@@ -66,7 +66,8 @@
 
         List<TVLiveChannel> resultList = new ArrayList<>();
         for (TVLiveCategoryChannelMap sc : mapList) {
-            resultList.add(map.get(sc.getChannelId()));
+            if (map.get(sc.getChannelId()) != null)
+                resultList.add(map.get(sc.getChannelId()));
         }
         return resultList;
     }

--
Gitblit v1.8.0