| | |
| | | @Resource |
| | | private VideoResourceMapExtraInfoService videoResourceMapExtraInfoService; |
| | | |
| | | public List<HomeType> getHomeType() { |
| | | public List<HomeType> getHomeTypeDetailList() { |
| | | List<HomeType> list = homeTypeDao.list("from HomeType h order by h.orderby desc"); |
| | | |
| | | return getHomeType(list); |
| | | } |
| | | |
| | | public List<HomeType> getHomeTypeList(String systemId){ |
| | | List<HomeType> list = homeTypeDao.list("from HomeType h where h.system.id=? order by h.orderby desc",systemId); |
| | | return list; |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | |
| | | for (HomeVideo sp : homeVideoList) |
| | | session.delete(sp); |
| | | |
| | | session.delete(new HomeType(id)); |
| | | session.delete(session.get(HomeType.class,id)); |
| | | session.flush(); |
| | | session.getTransaction().commit(); |
| | | } catch (Exception e) { |
| | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | List<HomeVideo> videoList = session |
| | | .createQuery( |
| | | "select h from HomeVideo h LEFT JOIN h.juhe as v where v.id=h.video.id and h.video.show='1' and hometype=:hometype order by v.orderby desc,v.watchCount desc,h.createtime desc") |
| | | "select h from HomeVideo h where h.video.show='1' and hometype=:hometype order by h.video.orderby desc,h.video.watchCount desc,h.video.createtime desc") |
| | | .setParameter("hometype", ((HomeType) list.get(i)).getId()).setFirstResult(0) |
| | | .setMaxResults(list.get(i).getNumber()).list(); |
| | | ((HomeType) list.get(i)).setHomeVideoList(videoList); |