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/service/imp/live/TVLiveCategoryChannelServiceImpl.java | 12 ++++++++++-- 1 files changed, 10 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 bb82906..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, 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; } @@ -84,5 +85,12 @@ return tvLiveCategoryChannelMapDao.findList(query); } + @Override + public TVLiveCategoryChannelMap selectByCategoryIdAndChannelId(String categoryId, String channelId) { + Query query = new Query(); + query.addCriteria(Criteria.where("channelId").is(channelId).and("categoryId").is(categoryId)); + return tvLiveCategoryChannelMapDao.findOne(query); + } + } -- Gitblit v1.8.0