public static ScalePolicyDO buildScalePolicyDO(final ScalePolicyDTO scalePolicyDTO) {
        return Optional.ofNullable(scalePolicyDTO).map(item -> {
            Timestamp currentTime = new Timestamp(System.currentTimeMillis());
            try {
                ScalePolicyDO scalePolicyDO =
                        ScalePolicyDO.builder()
                                .sort(item.getSort())
                                .status(item.getStatus())
                                .num(item.getNum())
                                .beginTime(Objects.nonNull(item.getBeginTime()) && DateUtils.isValidDate(DateUtils.localDateTimeToString(item.getBeginTime()))
                                        ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(DateUtils.localDateTimeToString(item.getBeginTime())) : null)
                                .endTime(Objects.nonNull(item.getEndTime()) && DateUtils.isValidDate(DateUtils.localDateTimeToString(item.getEndTime()))
                                        ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(DateUtils.localDateTimeToString(item.getEndTime())) : null)
                                .dateUpdated(currentTime)
                                .build();
                if (StringUtils.isEmpty(item.getId())) {
                    scalePolicyDO.setId(UUIDUtils.getInstance().generateShortUuid());
                    scalePolicyDO.setDateCreated(currentTime);
                } else {
                    scalePolicyDO.setId(item.getId());
                }
                return scalePolicyDO;
            } catch (ParseException e) {
                throw new RuntimeException(e);
            }
        }).orElse(null);
    }
buildScalePolicyDO.

@param scalePolicyDTO scalePolicyDTO
@return ScalePolicyDO
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/entity/ScalePolicyDO.java