| | |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.service.inter.VideoResourceMapExtraInfoService; |
| | | import com.yeshi.buwan.service.inter.video.VideoInfoExtraService; |
| | | import com.yeshi.buwan.util.JuHe.VideoResourceUtil; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.SQLQuery; |
| | |
| | | private CategoryRecommendVideoService categoryRecommendVideoService; |
| | | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | private VideoInfoExtraService videoInfoExtraService; |
| | | |
| | | @Resource |
| | | private VideoResourceUtil videoResourceUtil; |
| | |
| | | @Cacheable(value = "topCache", key = "'getVideoListByRank'+'-'+#videotype+'-'+#detailSystem+'-'+#platform+'-'+#version") |
| | | public List<VideoInfo> getVideoListByRank(final int videotype, final String detailSystem, String platform, Integer version) { |
| | | |
| | | List<Long> resourceList = videoResourceUtil.getAvailableResourceIds(platform, version); |
| | | List<Long> resourceList = videoResourceUtil.getAvailableResourceIds(new DetailSystem(detailSystem), version); |
| | | |
| | | final int count = categoryRecommendVideoService.getRankVideoNumber(videotype); |
| | | List<VideoInfo> videoInfoList = (List<VideoInfo>) dao.excute(new HibernateCallback<List<VideoInfo>>() { |
| | |
| | | } |
| | | }); |
| | | |
| | | return videoResourceMapExtraInfoService.batchExtraInfo(videoInfoList, resourceList); |
| | | return videoInfoExtraService.batchExtra(videoInfoList, resourceList); |
| | | } |
| | | |
| | | public CategoryRecommendCacheVideo getByVid(String vid) { |