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