@Test public void getServersByServerGroupId() throws Exception { Long serverGroupId = 11L; List<Server> list = serverDao.getServersByServerGroupId(serverGroupId); System.out.println("getServersByServerGroupId :-------> " + list); Assert.assertTrue(list.size() > 0); }
public List<Server> getServersByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_group_id, ip, port, comment, insert_time, update_time FROM server where server_group_id = ?"; return this.queryBySql(sql, Server.class, Parameter.integerOf("", serverGroupId)); }
ServerDao extends BaseDao { public List<Server> getServersByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_group_id, ip, port, comment, insert_time, update_time FROM server where server_group_id = ?"; return this.queryBySql(sql, Server.class, Parameter.integerOf("", serverGroupId)); } }
ServerDao extends BaseDao { public List<Server> getServersByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_group_id, ip, port, comment, insert_time, update_time FROM server where server_group_id = ?"; return this.queryBySql(sql, Server.class, Parameter.integerOf("", serverGroupId)); }  }
ServerDao extends BaseDao { public List<Server> getServersByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_group_id, ip, port, comment, insert_time, update_time FROM server where server_group_id = ?"; return this.queryBySql(sql, Server.class, Parameter.integerOf("", serverGroupId)); }  Server getServerById(Long id); Long insertServer(Server server); int updateServer(Server server); int deleteServer(Server server); int deleteServerAndServerConfigByServerId(Long serverId); boolean isNotExistByIpAndPort(Server server); int deleteServerByServerGroupId(Long serverGroupId); int changeServerGroup(long serverId, long serverGroupId); List<Server> getServersByServerGroupId(Long serverGroupId); Long getServerTotalCount(Paging<Server> paging); List<ServerView> findServerPageList(Paging<Server> paging); }
ServerDao extends BaseDao { public List<Server> getServersByServerGroupId(Long serverGroupId) throws SQLException { String sql = "SELECT id, server_group_id, ip, port, comment, insert_time, update_time FROM server where server_group_id = ?"; return this.queryBySql(sql, Server.class, Parameter.integerOf("", serverGroupId)); }  Server getServerById(Long id); Long insertServer(Server server); int updateServer(Server server); int deleteServer(Server server); int deleteServerAndServerConfigByServerId(Long serverId); boolean isNotExistByIpAndPort(Server server); int deleteServerByServerGroupId(Long serverGroupId); int changeServerGroup(long serverId, long serverGroupId); List<Server> getServersByServerGroupId(Long serverGroupId); Long getServerTotalCount(Paging<Server> paging); List<ServerView> findServerPageList(Paging<Server> paging);  }