| | |
| | | homeTypeDao.update(type); |
| | | } |
| | | |
| | | public void updateHomeVideo(HomeVideo type) { |
| | | |
| | | homeVideoDao.update(type); |
| | | } |
| | | |
| | | public List<DetailSystemSelect> getDetailSystemSelectByType(String homeType) { |
| | | List<DetailSystemSelect> li = new ArrayList<>(); |
| | | List<DetailSystem> list = detailSystemDao |
| | |
| | | } |
| | | return li; |
| | | } |
| | | |
| | | public void addHomeTypeVideo(HomeVideo video) { |
| | | |
| | | long count = homeVideoDao.getCount("select count(*) from HomeVideo h where h.type.id=? and h.video.id=?", |
| | | new String[]{video.getType().getId(), video.getVideo().getId()}); |
| | | if (count <= 0L) |
| | | homeVideoDao.create(video); |
| | | } |
| | | |
| | | public void addHomeTypeVideo(List<HomeVideo> list) { |
| | | HomeVideo info; |
| | | for (Iterator<HomeVideo> iterator = list.iterator(); iterator.hasNext(); addHomeTypeVideo(info)) |
| | | info = (HomeVideo) iterator.next(); |
| | | } |
| | | |
| | | public void deleteHomeVideo(HomeVideo video) { |
| | | |
| | | homeVideoDao.delete(video); |
| | | } |
| | | |
| | | public void deleteHomeTypeVideo(List<HomeVideo> list) { |
| | | HomeVideo video; |
| | | for (Iterator<HomeVideo> iterator = list.iterator(); iterator.hasNext(); deleteHomeVideo(video)) |
| | | video = (HomeVideo) iterator.next(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public Serializable addHomeType(HomeType type) { |
| | |
| | | andList.add("c.special_data_key='" + dataKey + "'"); |
| | | } |
| | | |
| | | sql = "select count(*) from (select count(*) from wk_video_super_hometype zb left join wk_video_hometype c on c.id=zb.hometypeid where " + org.yeshi.utils.StringUtil.concat(andList, " and ") + " group by zb.hometypeid) s"; |
| | | sql = "select count(*) from (select count(*) from wk_video_hometype c left join wk_video_super_hometype zb on c.id=zb.hometypeid where " + org.yeshi.utils.StringUtil.concat(andList, " and ") + " group by c.id) s"; |
| | | } |
| | | return homeTypeDao.getCountSQL(sql); |
| | | } |