| | |
| | | import com.yeshi.buwan.service.imp.VideoTypeService; |
| | | import com.yeshi.buwan.service.inter.juhe.InternetSearchVideoService; |
| | | import com.yeshi.buwan.service.inter.juhe.TencentVideoService; |
| | | import com.yeshi.buwan.service.manager.search.SolrShortVideoDataManager; |
| | | import com.yeshi.buwan.tencent.entity.TencentCoverInfo; |
| | | import com.yeshi.buwan.tencent.entity.TencentCoverVideo; |
| | | import com.yeshi.buwan.tencent.entity.TencentSearchVideoMap; |
| | | import com.yeshi.buwan.util.factory.VideoInfoFactory; |
| | | import com.yeshi.buwan.util.video.VideoConstant; |
| | | import com.yeshi.buwan.util.video.shortvideo.ShortVideoUtil; |
| | | import com.yeshi.buwan.youku.YouKuUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | @Resource |
| | | private VideoTypeService videoTypeService; |
| | | |
| | | @Resource |
| | | private SolrShortVideoDataManager solrShortVideoDataManager; |
| | | |
| | | public final static int RESOURCE_ID = 17; |
| | | |
| | | public static VideoDetailInfo convertToDetail(TencentCoverVideo tencentCoverVideo, TencentCoverInfo coverInfo) { |
| | |
| | | return detail; |
| | | } |
| | | |
| | | public VideoInfo getVideoInfo(InternetSearchVideo internetSearchVideo) throws Exception { |
| | | public VideoInfo getVideoInfo(InternetSearchVideo internetSearchVideo, Integer pageSize) throws Exception { |
| | | TencentSearchVideoMap map = tencentVideoService.selectMapByVideoId(internetSearchVideo.getId()); |
| | | if (map == null) { |
| | | throw new Exception("视频源不存在"); |
| | | } |
| | | |
| | | TencentCoverInfo showDetail = tencentVideoService.getSimpleCoverDetail(map.getCoverId()); |
| | | showDetail.setVideoList(tencentVideoService.getVideoList(showDetail.getId(), 1, 100)); |
| | | showDetail.setVideoList(tencentVideoService.getVideoList(showDetail.getId(), 1, pageSize)); |
| | | VideoInfo info = VideoInfoFactory.create(internetSearchVideo); |
| | | info.setIntroduction(showDetail.getDescription()); |
| | | info.setVideoDetailList(convertToDetail(showDetail.getVideoList(), showDetail)); |