class ServerGroupDao extends BaseDao {

    public int deleteServerGroupAndServerAndServerConfigByServerGroupId(Long serverGroupId) throws SQLException {
        String sql = "DELETE t1, t2, t3 " +
                "from `server_group` t1 " +
                "left join `server` t2 on t1.id = t2.server_group_id " +
                "left join `server_config` t3 on t2.id = t3.server_id " +
                "where t1.id = ?";
        return this.updataBysql(sql, Parameter.integerOf(StringUtils.EMPTY, serverGroupId));
    }

}