From b30fb8afd3cd6228bda9b182dc412bb3c8daf69c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 17 十月 2024 16:28:48 +0800 Subject: [PATCH] CMQ转为Rabbitmq --- src/main/java/com/yeshi/buwan/controller/parser/web/WebVideosParser.java | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/controller/parser/web/WebVideosParser.java b/src/main/java/com/yeshi/buwan/controller/parser/web/WebVideosParser.java index 65ec4f7..a4cfb00 100644 --- a/src/main/java/com/yeshi/buwan/controller/parser/web/WebVideosParser.java +++ b/src/main/java/com/yeshi/buwan/controller/parser/web/WebVideosParser.java @@ -7,11 +7,11 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import com.yeshi.buwan.exception.video.VideoPlayException; import org.springframework.stereotype.Controller; -import com.rabbitmq.tools.json.JSONUtil; import com.yeshi.buwan.domain.CategoryContry; -import com.yeshi.buwan.domain.DetailSystem; +import com.yeshi.buwan.domain.system.DetailSystem; import com.yeshi.buwan.domain.VideoDetailInfo; import com.yeshi.buwan.domain.VideoInfo; import com.yeshi.buwan.domain.VideoType; @@ -128,7 +128,7 @@ JSONObject object = new JSONObject(); DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); - List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(detailSystem, 1); + List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(detailSystem, 1,null); // 鑾峰彇瑙嗛鍒楄〃 List<VideoInfo> list1; if (type.equalsIgnoreCase("area")) { @@ -198,7 +198,7 @@ return; } - List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1); + List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1,null); VideoInfo info = (videoDeailUtil.getVideoInfo(null, videoId, resourceId, resourceList, CacheUtil.getMD5Long(resourceList))); @@ -285,7 +285,7 @@ return; } - List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1); + List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), 1,null); DetailSystem ds = systemService.getDetailSystemByPackage(packageName); // 鐚滀綘鍠滄 @@ -379,7 +379,12 @@ DetailSystem detailSystem = systemService.getDetailSystemByPackage(packageName); - PlayUrl pu = videoDeailUtil.getPlayUrl(null, detailSystem.getId(), id, type, Integer.parseInt(resourceId), videoId); + PlayUrl pu = null; + try { + pu = videoDeailUtil.getPlayUrl(null, detailSystem.getId(), id, type, Integer.parseInt(resourceId), videoId); + } catch (VideoPlayException e) { + e.printStackTrace(); + } if (pu != null) { if (!StringUtil.isNullOrEmpty(pu.getUrl())) -- Gitblit v1.8.0