ServerDao extends BaseDao { public int deleteServerByServerGroupId(Long serverGroupId) throws SQLException { String sql = "DELETE FROM server WHERE server_group_id = ?"; return this.updataBysql(sql, Parameter.integerOf(StringUtils.EMPTY, 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);  }
@Test public void deleteServerByServerGroupId() throws Exception { Long id = 1L; int _id = serverDao.deleteServerByServerGroupId(id); System.out.println("deleteServerByServerGroupId :-------> " + _id); Assert.assertTrue(_id > 0); }