@Override
    public ConfigImportResult importData(final String namespace, final List<ProxySelectorData> proxySelectorList,
                                         final ConfigsImportContext context) {
        if (CollectionUtils.isEmpty(proxySelectorList)) {
            return ConfigImportResult.success();
        }
        Map<String, String> proxySelectorIdMapping = context.getProxySelectorIdMapping();
        Map<String, List<ProxySelectorDO>> pluginProxySelectorMap = proxySelectorMapper
                .selectByNamespaceId(namespace)
                .stream()
                .collect(Collectors.groupingBy(ProxySelectorDO::getPluginName));
        int successCount = 0;
        StringBuilder errorMsgBuilder = new StringBuilder();
        for (ProxySelectorData selectorData : proxySelectorList) {
            String pluginName = selectorData.getPluginName();
            String proxySelectorName = selectorData.getName();
            Map<String, String> existProxySelectorNameSet = pluginProxySelectorMap
                    .getOrDefault(pluginName, Lists.newArrayList())
                    .stream()
                    .collect(Collectors.toMap(ProxySelectorDO::getName, ProxySelectorDO::getId));
            
            if (existProxySelectorNameSet.containsKey(proxySelectorName)) {
                errorMsgBuilder
                        .append(proxySelectorName)
                        .append(",");
                proxySelectorIdMapping.put(selectorData.getId(), existProxySelectorNameSet.get(proxySelectorName));
                continue;
            }
            String oldProxySelectorId = selectorData.getId();
            String newProxySelectorId = UUIDUtils.getInstance().generateShortUuid();
            selectorData.setId(newProxySelectorId);
            selectorData.setNamespaceId(namespace);
            ProxySelectorDO proxySelectorDO = ProxySelectorDO.buildProxySelectorDO(selectorData);
            if (proxySelectorMapper.insert(proxySelectorDO) > 0) {
                proxySelectorIdMapping.put(oldProxySelectorId, newProxySelectorId);
                successCount++;
            }
        }
        if (StringUtils.hasLength(errorMsgBuilder)) {
            errorMsgBuilder.setLength(errorMsgBuilder.length() - 1);
            return ConfigImportResult
                    .fail(successCount, "import fail proxy selector: " + errorMsgBuilder);
        }
        return ConfigImportResult.success(successCount);
    }
update.

@param proxySelectorAddDTO proxySelectorAddDTO
@return the string
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ProxySelectorServiceImpl.java