public static RuleDO buildRuleDO(final RuleDTO ruleDTO) {
        return Optional.ofNullable(ruleDTO).map(item -> {
            Timestamp currentTime = new Timestamp(System.currentTimeMillis());
            RuleDO ruleDO = RuleDO.builder()
                    .selectorId(item.getSelectorId())
                    .matchMode(item.getMatchMode())
                    .name(item.getName())
                    .enabled(item.getEnabled())
                    .loged(item.getLoged())
                    .sort(item.getSort())
                    .handle(item.getHandle())
                    .matchRestful(item.getMatchRestful())
                    .dateUpdated(currentTime)
                    .namespaceId(item.getNamespaceId())
                    .build();
            if (StringUtils.isEmpty(item.getId())) {
                ruleDO.setId(UUIDUtils.getInstance().generateShortUuid());
                ruleDO.setDateCreated(currentTime);
            } else {
                ruleDO.setId(item.getId());
            }
            return ruleDO;
        }).orElse(null);
    }
build ruleDO.

@param ruleDTO {@linkplain RuleDTO}
@return {@linkplain RuleDO}
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/entity/RuleDO.java