public DiscoveryDTO mapToDTO(DiscoveryDO discoveryDO) {
        return Optional.ofNullable(discoveryDO).map(data -> {
            DiscoveryDTO discoveryDTO = new DiscoveryDTO();
            discoveryDTO.setId(data.getId());
            discoveryDTO.setName(data.getName());
            discoveryDTO.setType(data.getType());
            discoveryDTO.setLevel(data.getLevel());
            discoveryDTO.setServerList(data.getServerList());
            discoveryDTO.setPluginName(data.getPluginName());
            discoveryDTO.setProps(data.getProps());
            return discoveryDTO;
        }).orElse(null);
    }
mapToVo.

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