public DiscoveryUpstreamDTO mapToDTO(DiscoveryUpstreamDO discoveryUpstreamDO) {
        return Optional.ofNullable(discoveryUpstreamDO).map(data -> {
            DiscoveryUpstreamDTO discoveryUpstreamDTO = new DiscoveryUpstreamDTO();
            discoveryUpstreamDTO.setProps(data.getProps());
            discoveryUpstreamDTO.setStatus(data.getStatus());
            discoveryUpstreamDTO.setUrl(data.getUrl());
            discoveryUpstreamDTO.setDiscoveryHandlerId(data.getDiscoveryHandlerId());
            discoveryUpstreamDTO.setProtocol(data.getProtocol());
            discoveryUpstreamDTO.setId(data.getId());
            discoveryUpstreamDTO.setWeight(data.getWeight());
            discoveryUpstreamDTO.setDateCreated(data.getDateCreated());
            discoveryUpstreamDTO.setDateUpdated(data.getDateUpdated());
            return discoveryUpstreamDTO;
        }).orElse(null);
    }
mapToDTO.

@param discoveryUpstreamDO discoveryUpstreamDO
@return DiscoveryUpstreamDTO
shenyu-admin/src/main/java/org/apache/shenyu/admin/transfer/DiscoveryTransfer.java