public static List<ResourceDO> getDeleteResourceIds(final List<String> resourceIds, final List<ResourceDO> allMetaDataResources) {
        if (CollectionUtils.isEmpty(allMetaDataResources) || CollectionUtils.isEmpty(resourceIds)) {
            return Collections.emptyList();
        }
        final List<ResourceDO> deleteResourceIds = new ArrayList<>();
        final Map<String, ResourceDO> metaMap = ListUtil.toMap(allMetaDataResources, ResourceDO::getId);
        final Map<String, Set<String>> metaChildrenMap = dealChildrenMap(allMetaDataResources);
        
        final Deque<String> cacheDatas = new ArrayDeque<>(resourceIds);
        while (!cacheDatas.isEmpty()) {
            String resourceId = cacheDatas.pollFirst();
            ResourceDO resourceVO = metaMap.get(resourceId);
            Set<String> children = metaChildrenMap.get(resourceId);
            if (Objects.nonNull(resourceVO)) {
                deleteResourceIds.add(resourceVO);
                metaMap.remove(resourceId);
            }
            if (CollectionUtils.isNotEmpty(children)) {
                children.forEach(cacheDatas::addFirst);
                metaChildrenMap.remove(resourceId);
            }
        }
        return deleteResourceIds;
    }
get delete resource ids.

@param resourceIds          resource ids
@param allMetaDataResources all resource object
@return the list of ids to delete
shenyu-admin/src/main/java/org/apache/shenyu/admin/utils/ResourceUtil.java