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; }