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: