admin
2021-09-24 f788607ff771a47bc60d6a86e00b3433c40f3d2c
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 + ""));
        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"));
    }
}