From 3126672fcbb1857de85129292074463b8e3cf80d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 25 Jul 2023 21:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20ErrorCodeApi=20=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=20LocalDateTime=20=E5=8F=82=E6=95=B0=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/api/errorcode/ErrorCodeApi.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java index 202fee02a..3b007a443 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/errorcode/ErrorCodeApi.java @@ -4,11 +4,12 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeAutoGenerateReqDTO; import cn.iocoder.yudao.module.system.api.errorcode.dto.ErrorCodeRespDTO; import cn.iocoder.yudao.module.system.enums.ApiConstants; -import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -16,9 +17,10 @@ import org.springframework.web.bind.annotation.RequestParam; import javax.validation.Valid; import java.time.LocalDateTime; -import java.util.Date; import java.util.List; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + @FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = @Tag(name = "RPC 服务 - 错误码") public interface ErrorCodeApi { @@ -35,7 +37,9 @@ public interface ErrorCodeApi { @Parameter(name = "applicationName", description = "应用名", example = "system-server", required = true), @Parameter(name = "minUpdateTime", description = "最小更新时间") }) - CommonResult> getErrorCodeList(@RequestParam(value = "applicationName") String applicationName, - @RequestParam(value = "minUpdateTime", required = false) LocalDateTime minUpdateTime); + CommonResult> getErrorCodeList( + @RequestParam(value = "applicationName") String applicationName, + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @RequestParam(value = "minUpdateTime", required = false) LocalDateTime minUpdateTime); -} \ No newline at end of file +}