@Test public void getAppGroupsByServerGroupId() throws Exception { List<AppGroup> list = appGroupDao.getAppGroupsByServerGroupId(2L); System.out.println("getAppGroupsByServerGroupId :-------> " + list); Assert.assertTrue(list.size() > 0); }
public List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_enabled, server_group_id, name, comment, insert_time, update_time FROM app_group where server_group_id = " + serverGroupId; return this.queryBySql(sql, AppGroup.class); }
AppGroupDao extends BaseDao { public List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_enabled, server_group_id, name, comment, insert_time, update_time FROM app_group where server_group_id = " + serverGroupId; return this.queryBySql(sql, AppGroup.class); } }
AppGroupDao extends BaseDao { public List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_enabled, server_group_id, name, comment, insert_time, update_time FROM app_group where server_group_id = " + serverGroupId; return this.queryBySql(sql, AppGroup.class); }  }
AppGroupDao extends BaseDao { public List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_enabled, server_group_id, name, comment, insert_time, update_time FROM app_group where server_group_id = " + serverGroupId; return this.queryBySql(sql, AppGroup.class); }  Long insertAppGroup(AppGroup appGroup); AppGroup getAppGroupById(Long id); int updateAppGroup(AppGroup appGroup); int deleteAppGroup(AppGroup appGroup); Long getCountByName(String name); Long getCountByIdAndName(Long id, String name); int changeServerGroup(Long newServerGroupId, Set<Long> appGroupIds); List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId); Long getAppGroupTotalCount(Paging<AppGroup> paging); List<AppGroupView> findAppGroupPageList(Paging<AppGroup> paging); }
AppGroupDao extends BaseDao { public List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_enabled, server_group_id, name, comment, insert_time, update_time FROM app_group where server_group_id = " + serverGroupId; return this.queryBySql(sql, AppGroup.class); }  Long insertAppGroup(AppGroup appGroup); AppGroup getAppGroupById(Long id); int updateAppGroup(AppGroup appGroup); int deleteAppGroup(AppGroup appGroup); Long getCountByName(String name); Long getCountByIdAndName(Long id, String name); int changeServerGroup(Long newServerGroupId, Set<Long> appGroupIds); List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId); Long getAppGroupTotalCount(Paging<AppGroup> paging); List<AppGroupView> findAppGroupPageList(Paging<AppGroup> paging);  }