| | |
| | | @Resource |
| | | private DetailSystemDao detailSystemDao; |
| | | |
| | | public SuperSpecialDao getSuperSpecialDao() { |
| | | return superSpecialDao; |
| | | } |
| | | |
| | | public void setSuperSpecialDao(SuperSpecialDao superSpecialDao) { |
| | | this.superSpecialDao = superSpecialDao; |
| | | } |
| | | |
| | | public VideoInfoDao getVideoInfoDao() { |
| | | return videoInfoDao; |
| | | } |
| | | |
| | | public void setVideoInfoDao(VideoInfoDao videoInfoDao) { |
| | | this.videoInfoDao = videoInfoDao; |
| | | } |
| | | |
| | | public SpecialVideoDao getSpecialVideoDao() { |
| | | return specialVideoDao; |
| | | } |
| | | |
| | | public void setSpecialVideoDao(SpecialVideoDao specialVideoDao) { |
| | | this.specialVideoDao = specialVideoDao; |
| | | } |
| | | |
| | | public SpecialDao getSpecialDao() { |
| | | return specialDao; |
| | | } |
| | | |
| | | public void setSpecialDao(SpecialDao specialDao) { |
| | | this.specialDao = specialDao; |
| | | } |
| | | |
| | | @Cacheable(value = "classCache",key="'getSpecialList'+'-'+#detailSystemId+'-'+#page") |
| | | public List<Special> getSpecialList(String detailSystemId, int page) { |
| | |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | public List<SpecialAdmin> getSpecialAdmin(String key, int detailSystem, int page) { |
| | | public List<SpecialAdmin> getSpecialAdmin(String key, String systemId, int detailSystem, int page) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | List<SpecialAdmin> zhiBoClassList = new ArrayList<>(); |
| | | |
| | | try { |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem"); |
| | | List<DetailSystem> detailSystemList = detailSystemDao.list("from DetailSystem ds where ds.system.id=" + systemId); |
| | | String sql = ""; |
| | | if (detailSystem > 0) |
| | | sql = "select sh.special from SuperSpecial sh where sh.special.name like ? and sh.detailSystem.id=" |
| | | + detailSystem + " order by sh.special.orderby desc"; |
| | | else |
| | | sql = "from Special zb where zb.name like ? order by zb.orderby desc"; |
| | | sql = "from Special zb where zb.name like ? and zb.system.id=" + systemId + " order by zb.orderby desc"; |
| | | |
| | | List<Special> list = specialDao.list(sql, (page - 1) * Constant.pageCount, Constant.pageCount, |
| | | new Serializable[] { "%" + key + "%" }); |
| | |
| | | return zhiBoClassList; |
| | | } |
| | | |
| | | public long getSpecialAdminCount(String key, int detailSystem) { |
| | | public long getSpecialAdminCount(String key, String systemId, int detailSystem) { |
| | | key = StringUtil.isNullOrEmpty(key) ? "" : key; |
| | | |
| | | String sql = ""; |
| | |
| | | sql = "select count(*) from (select count(*) from wk_video_super_special zb left join wk_video_special c on c.id=zb.specialid where zb.detailsystemid=" |
| | | + detailSystem + " and c.name like '%" + key + "%' group by zb.specialid) s"; |
| | | else |
| | | sql = "select count(*) from (select count(*) from wk_video_super_special zb left join wk_video_special c on c.id=zb.specialid where c.name like '%" |
| | | sql = "select count(*) from (select count(*) from wk_video_super_special zb left join wk_video_special c on c.id=zb.specialid where c.system=" + systemId + " and c.name like '%" |
| | | + key + "%' group by zb.specialid) s"; |
| | | |
| | | return specialVideoDao.getCountSQL(sql); |