public static DiscoveryUpstreamDO buildDiscoveryUpstreamDO(final DiscoveryUpstreamDTO discoveryUpstreamDTO) {

        return Optional.ofNullable(discoveryUpstreamDTO).map(item -> {
            Timestamp currentTime = new Timestamp(System.currentTimeMillis());
            DiscoveryUpstreamDO discoveryUpstreamDO = DiscoveryUpstreamDO.builder()
                    .discoveryHandlerId(item.getDiscoveryHandlerId())
                    .protocol(item.getProtocol())
                    .status(item.getStatus())
                    .weight(item.getWeight())
                    .props(item.getProps())
                    .url(item.getUrl())
                    .namespaceId(item.getNamespaceId())
                    .dateCreated(currentTime)
                    .dateUpdated(currentTime).build();
            if (StringUtils.hasLength(item.getId())) {
                discoveryUpstreamDO.setId(item.getId());
            } else {
                discoveryUpstreamDO.setId(UUIDUtils.getInstance().generateShortUuid());
                discoveryUpstreamDO.setDateCreated(currentTime);
            }
            return discoveryUpstreamDO;
        }).orElse(null);
    }
buildDiscoveryUpstreamDO.

@param discoveryUpstreamDTO discoveryUpstreamDTO
@return DiscoveryUpstreamDO
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/entity/DiscoveryUpstreamDO.java