From 6800dba32e0b838203c658630ae2e5c8650f6097 Mon Sep 17 00:00:00 2001 From: zhangli <123879394@qq.com> Date: Wed, 30 Jul 2025 01:13:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/sczx/order/po/OrderMainPO.java | 15 +++++++-------- src/main/java/com/sczx/order/po/OrderSubPO.java | 1 + src/main/resources/application.yml | 3 +++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/sczx/order/po/OrderMainPO.java b/src/main/java/com/sczx/order/po/OrderMainPO.java index 5662178..3841d18 100644 --- a/src/main/java/com/sczx/order/po/OrderMainPO.java +++ b/src/main/java/com/sczx/order/po/OrderMainPO.java @@ -1,6 +1,5 @@ package com.sczx.order.po; -import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -88,27 +87,27 @@ public class OrderMainPO implements Serializable { @ApiModelProperty("是否开通代扣") private Boolean isAutoDeduct; - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("首次下单时间") private LocalDateTime firstOrderTime; - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("开始计费时间") private LocalDateTime startRentTime; - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("还车时间") private LocalDateTime endRentTime; - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("申请还车时间") private LocalDateTime reqEndRentTime; - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("实际还车时间") private LocalDateTime actEndRentTime; @@ -131,12 +130,12 @@ public class OrderMainPO implements Serializable { @ApiModelProperty("删除标志(0代表存在 2代表删除)") private String delFlag; - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("创建时间") private LocalDateTime createTime; - @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("更新时间") private LocalDateTime updateTime; diff --git a/src/main/java/com/sczx/order/po/OrderSubPO.java b/src/main/java/com/sczx/order/po/OrderSubPO.java index 12143c8..13184c0 100644 --- a/src/main/java/com/sczx/order/po/OrderSubPO.java +++ b/src/main/java/com/sczx/order/po/OrderSubPO.java @@ -58,6 +58,7 @@ public class OrderSubPO implements Serializable { @ApiModelProperty("支付ID") private String paymentId; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty("实际支付时间") private LocalDateTime paidAt; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 235c7ad..568db2b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -13,6 +13,9 @@ spring: mvc: async: request-timeout: -1 + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 cloud: nacos: discovery: