From 3de67ee47c72474f3ed0c4dafe45bd4cc393b792 Mon Sep 17 00:00:00 2001 From: flykhan Date: Thu, 23 Feb 2023 16:53:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=20pojo->=20Bot=20=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=8C=BA=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/com/kob/backend/pojo/Bot.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/com/kob/backend/pojo/Bot.java b/backend/src/main/java/com/kob/backend/pojo/Bot.java index 0517f3f..478c15d 100644 --- a/backend/src/main/java/com/kob/backend/pojo/Bot.java +++ b/backend/src/main/java/com/kob/backend/pojo/Bot.java @@ -14,21 +14,22 @@ import java.util.Date; @AllArgsConstructor @NoArgsConstructor public class Bot { -// 主键自增 + // 主键自增 @TableId(type = IdType.AUTO) private Integer id; -// 注意:在pojo中需要定义成userId,在queryWrapper中的名称仍然为user_id + // 注意:在pojo中需要定义成userId,在queryWrapper中的名称仍然为user_id private Integer userId; private String title; private String description; private String content; private Integer rating; -// pojo中定义日期格式的注解:@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + // pojo中定义日期格式的注解:@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + // timezone 用于修改时区 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") private Date createtime; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") private Date modifytime; }