From 8fee151ffae0c3818694b7318583814bf92663e2 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 27 八月 2021 18:52:28 +0800 Subject: [PATCH] 聚合视频资源包调整,接入韩迷 --- src/test/java/com/hxh/spring/test/Test.java | 74 +++++++++++++++++++------------------ 1 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/test/java/com/hxh/spring/test/Test.java b/src/test/java/com/hxh/spring/test/Test.java index 1525b3b..8c636f3 100644 --- a/src/test/java/com/hxh/spring/test/Test.java +++ b/src/test/java/com/hxh/spring/test/Test.java @@ -1,6 +1,7 @@ package com.hxh.spring.test; import java.util.List; +import java.util.regex.Pattern; import com.yeshi.buwan.domain.system.DetailSystem; import com.yeshi.buwan.domain.VideoDetailInfo; @@ -18,48 +19,49 @@ public class Test { - @org.junit.Test - public void test() { - VideoResourceUtil videoResouceUtil = com.yeshi.buwan.util.BeanUtil.getBean(VideoResourceUtil.class); - VideoDetailUtil videoDeailUtil = com.yeshi.buwan.util.BeanUtil.getBean(VideoDetailUtil.class); - ClassService classService = com.yeshi.buwan.util.BeanUtil.getBean(ClassService.class); + @org.junit.Test + public void test() { + VideoResourceUtil videoResouceUtil = com.yeshi.buwan.util.BeanUtil.getBean(VideoResourceUtil.class); + VideoDetailUtil videoDeailUtil = com.yeshi.buwan.util.BeanUtil.getBean(VideoDetailUtil.class); + ClassService classService = com.yeshi.buwan.util.BeanUtil.getBean(ClassService.class); - List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), Integer.parseInt(70 + ""),null); + List<Long> resourceList = videoResouceUtil.getAvailableResourceIds(new DetailSystem("44"), Integer.parseInt(70 + ""), null); - VideoInfo info = (videoDeailUtil.getVideoInfo(null,3400048 + "", 13 + "", resourceList, - CacheUtil.getMD5Long(resourceList))); + VideoInfo info = (videoDeailUtil.getVideoInfo(null, 3400048 + "", 13 + "", resourceList, + CacheUtil.getMD5Long(resourceList))); - List<VideoType> typeList = classService.getVideoTypeList(info.getId()); - if (typeList != null && typeList.size() > 0) { - VideoType type = typeList.get(0); - while (type.getParent() != null) - type = type.getParent(); - info.setVideoType(type); - } + List<VideoType> typeList = classService.getVideoTypeList(info.getId()); + if (typeList != null && typeList.size() > 0) { + VideoType type = typeList.get(0); + while (type.getParent() != null) + type = type.getParent(); + info.setVideoType(type); + } - info.setPlayPicture(VideoPictureUtil.getShowPicture(info, "android", 70 + "")); - for (VideoDetailInfo vd : info.getVideoDetailList()) { - if (StringUtil.isNullOrEmpty(vd.getExtraId())) - vd.setExtraId(vd.getId() + ""); - } + info.setPlayPicture(VideoPictureUtil.getShowPicture(info, "android", 70 + "")); + for (VideoDetailInfo vd : info.getVideoDetailList()) { + if (StringUtil.isNullOrEmpty(vd.getExtraId())) + vd.setExtraId(vd.getId() + ""); + } - } + } - @org.junit.Test - public void test2() { - BanQuanService banQuanService = BeanUtil.getBean(BanQuanService.class); - List<String> keys = banQuanService.getBanQuanKeyListAll(43); - System.out.println(keys); - } + @org.junit.Test + public void test2() { + BanQuanService banQuanService = BeanUtil.getBean(BanQuanService.class); + List<String> keys = banQuanService.getBanQuanKeyListAll(43); + System.out.println(keys); + } - @org.junit.Test - public void test3() { - SolrUtil.dataimportVideo(); - } - - @org.junit.Test - public void test4() { - SolrUtil.dataimportVideo(); - } + @org.junit.Test + public void test3() { + SolrUtil.dataimportVideo(); + } + + @org.junit.Test + public void test4() { + String regex = "^http://www\\.baidu\\.com"; + System.out.print(Pattern.matches(regex, "http://www.baidu.com")); + } } -- Gitblit v1.8.0