public static ResourceDO buildResourceDO(final ResourceDTO resourceDTO) {
        return Optional.ofNullable(resourceDTO).map(item -> {
            Timestamp currentTime = new Timestamp(System.currentTimeMillis());
            ResourceDO resourceDO = ResourceDO.builder()
                    .parentId(item.getParentId())
                    .title(item.getTitle())
                    .name(item.getName())
                    .url(item.getUrl())
                    .component(item.getComponent())
                    .resourceType(item.getResourceType())
                    .sort(item.getSort())
                    .icon(item.getIcon())
                    .isLeaf(item.getIsLeaf())
                    .isRoute(item.getIsRoute())
                    .perms(item.getPerms())
                    .status(item.getStatus())
                    .build();
            if (StringUtils.isEmpty(item.getId())) {
                resourceDO.setId(UUIDUtils.getInstance().generateShortUuid());
                resourceDO.setDateCreated(currentTime);
            } else {
                resourceDO.setId(item.getId());
            }
            return resourceDO;
        }).orElse(null);
    }
build ResourceDO.

@param resourceDTO {@linkplain ResourceDTO}
@return {@linkplain ResourceDO}
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/entity/ResourceDO.java