diff --git a/src/main/java/com/aiprose/mbp/controller/UserController.java b/src/main/java/com/aiprose/mbp/controller/UserController.java index a40f749..2a2828d 100644 --- a/src/main/java/com/aiprose/mbp/controller/UserController.java +++ b/src/main/java/com/aiprose/mbp/controller/UserController.java @@ -16,6 +16,7 @@ import java.util.List; @RestController @Api(tags = "用户接口-用户信息相关") public class UserController { + @Autowired private UserService userService; diff --git a/src/main/java/com/aiprose/mbp/entity/SuperEntity.java b/src/main/java/com/aiprose/mbp/entity/SuperEntity.java index 8f9cb8a..3769f97 100644 --- a/src/main/java/com/aiprose/mbp/entity/SuperEntity.java +++ b/src/main/java/com/aiprose/mbp/entity/SuperEntity.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.gitee.sunchenbin.mybatis.actable.annotation.Column; import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement; import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey; +import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant; import lombok.Data; import java.io.Serializable; @@ -23,11 +24,11 @@ public class SuperEntity implements Serializable { /** * 创建时间 */ - @Column(name = "create_time",comment = "创建时间") // name指定数据库字段名,comment为备注 + @Column(name = "create_time",comment = "创建时间",type = MySqlTypeConstant.DATETIME) // name指定数据库字段名,comment为备注 private Date createTime = new Date(); /** * 最后修改时间 */ - @Column(name = "update_time",comment = "最后修改时间") + @Column(name = "update_time",comment = "最后修改时间",type = MySqlTypeConstant.DATETIME) private Date updateTime; } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3ec5356..0b14888 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -4,7 +4,7 @@ server: spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://47.98.109.5:3309/mbp?characterEncoding=utf8&useSSL=false + url: jdbc:mysql://47.98.109.5:3309/mbp?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 username: root password: trgis hikari: