| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.apache.log4j.pattern.LogEvent; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | |
| | | import org.springframework.orm.hibernate4.HibernateCallback; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.buwan.dao.LoginUserDao; |
| | | import com.yeshi.buwan.dao.user.LoginUserDao; |
| | | import com.yeshi.buwan.dao.VideoPlayStatisticsDao; |
| | | import com.yeshi.buwan.dao.VideoTypeDao; |
| | | import com.yeshi.buwan.domain.CategoryContry; |
| | |
| | | * 统计 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Service |
| | | public class StatisticsService { |
| | |
| | | for (VideoType vt : typeList) { |
| | | // 只统计电影,电视剧,综艺,动漫的榜首 |
| | | if (vt.getId() == 150 || vt.getId() == 151 || vt.getId() == 152 || vt.getId() == 153) { |
| | | //电影电视剧不更新榜首 |
| | | if(vt.getId() == 150 || vt.getId() == 151) |
| | | continue; |
| | | // if(1>0) |
| | | // continue; |
| | | String sql = String.format( |
| | |
| | | List<CategoryContry> rootList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent is null").list(); |
| | | for (CategoryContry cc : rootList) { |
| | | //排除电影/电视剧 |
| | | if (cc.getCid() == 150L || cc.getCid() == 151L) |
| | | continue; |
| | | List<CategoryContry> secondAreaList = (List<CategoryContry>) session |
| | | .createQuery("from CategoryContry cc where cc.parent.id=" + cc.getId()).list(); |
| | | for (CategoryContry se : secondAreaList) { |
| | |
| | | List<Long> resourceList = new ArrayList<Long>(); |
| | | for (VideoResource vr : list) |
| | | resourceList.add(Long.parseLong(vr.getId())); |
| | | VideoInfo info = videoDetailUtil.getVideoInfo(videoid, null, resourceList, |
| | | VideoInfo info = videoDetailUtil.getVideoInfo(null, videoid, null, resourceList, |
| | | StringUtil.Md5(System.currentTimeMillis() + "")); |
| | | int count = 0; |
| | | if (info != null && info.getVideoDetailList() != null) |