| | |
| | | import org.hibernate.SQLQuery; |
| | | import org.hibernate.Session; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Resource |
| | | private VideoResourceService videoResourceService; |
| | | |
| | | @Resource |
| | | private ClearService clearService; |
| | | |
| | | public VideoInfo getVideoInfo(String vid) { |
| | | return videoInfoDao.find(VideoInfo.class, vid); |
| | | } |
| | | |
| | | @Cacheable(value = "videoCache",key = "'getVideoInfoDetail-'+#vid") |
| | | public VideoInfo getVideoInfoCache(String vid) { |
| | | return videoInfoDao.find(VideoInfo.class, vid); |
| | | } |
| | | |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<VideoInfo> simpleRandomVideoList(final int i) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据名称与主演 |
| | | * |
| | |
| | | VideoInfo vi = list.get(i); |
| | | if (getSameDirectorOrActorCount(vi.getDirector(), newVideoInfo.getDirector()) > 0 || getSameDirectorOrActorCount(vi.getMainActor(), newVideoInfo.getMainActor()) > 0) { |
| | | // if (getSameDirectorOrActorCount(vi.getMainActor(), newVideoInfo.getMainActor()) > 0) { |
| | | return list.get(i); |
| | | //主分类一样 |
| | | if (vi.getVideoType() != null && newVideoInfo.getVideoType() != null && vi.getVideoType().getId() == newVideoInfo.getVideoType().getId()) |
| | | return list.get(i); |
| | | // } |
| | | } |
| | | } |