| | |
| | | import com.yeshi.buwan.dao.VideoPlayStatisticsDao; |
| | | import com.yeshi.buwan.dao.VideoTypeDao; |
| | | import com.yeshi.buwan.domain.CategoryContry; |
| | | import com.yeshi.buwan.domain.DetailSystem; |
| | | import com.yeshi.buwan.domain.system.DetailSystem; |
| | | import com.yeshi.buwan.domain.HotSearch; |
| | | import com.yeshi.buwan.domain.VideoInfo; |
| | | import com.yeshi.buwan.domain.VideoPlayStatistics; |
| | |
| | | @Cacheable(value = "statisticCache", key = "'getDetailSystemWatchCount'+'-'+#from+'-'+#to+'-'+#detailSystem") |
| | | @SuppressWarnings("rawtypes") |
| | | public List<StatisticXY> getDetailSystemWatchCount(String from, String to, String detailSystem) { |
| | | List<StatisticXY> xylist = new ArrayList<StatisticXY>(); |
| | | List<StatisticXY> xylist = new ArrayList<>(); |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | |
| | | long fromS = TimeUtil.convertDateToTemp(from); |
| | | long toS = TimeUtil.convertDateToTemp( |
| | | TimeUtil.getGernalTime((TimeUtil.convertDateToTemp(to) + 1000 * 60 * 60 * 24L), "yyyy-MM-dd")); |
| | | List<StatisticXY> xylist = new ArrayList<StatisticXY>(); |
| | | List<StatisticXY> xylist = new ArrayList<>(); |
| | | try { |
| | | List list; |
| | | if ("0".equalsIgnoreCase(detailsystem)) |
| | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Object[] objs = (Object[]) list.get(i); |
| | | if (map.get(objs[2] + "") == null) |
| | | map.put(objs[2] + "", new ArrayList<StatisticXY>()); |
| | | map.put(objs[2] + "", new ArrayList<>()); |
| | | StatisticXY xy = new StatisticXY(); |
| | | xy.setTime(objs[1] + ""); |
| | | xy.setY(Long.parseLong(objs[0] + "")); |
| | |
| | | |
| | | System.out.println(sql); |
| | | final String fsql = sql; |
| | | final List<StatisticXY> rlist = new ArrayList<StatisticXY>(); |
| | | final List<StatisticXY> rlist = new ArrayList<>(); |
| | | videoTypeDao.excute(new HibernateCallback() { |
| | | public Object doInHibernate(Session session) throws HibernateException { |
| | | List list = session.createSQLQuery(fsql).list(); |
| | |
| | | // 刷新视频详情数量 |
| | | public void refreshVideoDetailCount(final String videoid) { |
| | | List<VideoResource> list = videoResourceService.getResourceList(); |
| | | List<Long> resourceList = new ArrayList<Long>(); |
| | | List<Long> resourceList = new ArrayList<>(); |
| | | for (VideoResource vr : list) |
| | | resourceList.add(Long.parseLong(vr.getId())); |
| | | VideoInfo info = videoDetailUtil.getVideoInfo(null, videoid, null, resourceList, |