public static ProxySelectorDO buildProxySelectorDO(final ProxySelectorData proxySelectorData) {

        return Optional.ofNullable(proxySelectorData).map(item -> {
            Timestamp currentTime = new Timestamp(System.currentTimeMillis());
            ProxySelectorDO proxySelectorDO = ProxySelectorDO.builder()
                    .name(item.getName())
                    .pluginName(PluginEnum.TCP.getName())
                    .forwardPort(item.getForwardPort())
                    .type(item.getType())
                    .props(JsonUtils.toJson(item.getProps()))
                    .dateUpdated(currentTime).build();
            if (StringUtils.hasLength(item.getId())) {
                proxySelectorDO.setId(item.getId());
            } else {
                proxySelectorDO.setId(UUIDUtils.getInstance().generateShortUuid());
                proxySelectorDO.setDateCreated(currentTime);
            }
            if (Objects.isNull(proxySelectorDO.getDateCreated())) {
                proxySelectorDO.setDateCreated(currentTime);
            }
            if (Objects.isNull(proxySelectorDO.getDateUpdated())) {
                proxySelectorDO.setDateUpdated(currentTime);
            }
            return proxySelectorDO;
        }).orElse(null);
    }
buildProxySelectorDO.

@param proxySelectorData proxySelectorData
@return ProxySelectorDO
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/entity/ProxySelectorDO.java