class ServerGroupDao extends BaseDao {

    public List<Server> serversNoGroup(Integer appGroupId) throws SQLException {
        String cond = StringUtils.EMPTY;
        if (null != appGroupId && appGroupId > 0) {
            cond = " and id != " + appGroupId;
        }
        String sql = "select id, name, comment, insert_time, update_time from server_group where id not in (select server_group_id from app_group where server_group_id != 0 " + cond + ")";
        return this.queryBySql(sql, Server.class);
    }

}