public static SelectorDO buildSelectorDO(final SelectorDTO selectorDTO) {
        return Optional.ofNullable(selectorDTO).map(item -> {
            Timestamp currentTime = new Timestamp(System.currentTimeMillis());
            SelectorDO selectorDO = SelectorDO.builder()
                    .type(item.getType())
                    .sort(item.getSort())
                    .enabled(item.getEnabled())
                    .loged(item.getLoged())
                    .continued(item.getContinued())
                    .dateUpdated(currentTime)
                    .handle(item.getHandle())
                    .pluginId(item.getPluginId())
                    .name(item.getName())
                    .matchRestful(item.getMatchRestful())
                    .namespaceId(item.getNamespaceId())
                    .build();
            if (StringUtils.isEmpty(item.getId())) {
                selectorDO.setId(UUIDUtils.getInstance().generateShortUuid());
                selectorDO.setDateCreated(currentTime);
            } else {
                selectorDO.setId(item.getId());
            }
            if (SelectorTypeEnum.FULL_FLOW.getCode() == item.getType()) {
                selectorDO.setMatchMode(MatchModeEnum.AND.getCode());
            } else {
                selectorDO.setMatchMode(item.getMatchMode());
            }
            return selectorDO;
        }).orElse(null);
    }
build selectorDO.

@param selectorDTO {@linkplain SelectorDTO}
@return {@linkplain SelectorDO}
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/entity/SelectorDO.java