@Override
    public void nativeCreateOrUpdate(final DiscoveryUpstreamDTO discoveryUpstreamDTO) {
        DiscoveryUpstreamDO discoveryUpstreamDO = DiscoveryUpstreamDO.buildDiscoveryUpstreamDO(discoveryUpstreamDTO);
        if (StringUtils.hasLength(discoveryUpstreamDTO.getId())) {
            discoveryUpstreamMapper.updateSelective(discoveryUpstreamDO);
        } else {
            DiscoveryUpstreamDO existingRecord = discoveryUpstreamMapper.selectByDiscoveryHandlerIdAndUrl(discoveryUpstreamDO.getDiscoveryHandlerId(), discoveryUpstreamDO.getUrl());
            if (Objects.isNull(existingRecord)) {
                discoveryUpstreamMapper.insert(discoveryUpstreamDO);
            }
        }
    }
createOrUpdate.

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