为Entity基类添加字段注入
parent
2d19b18e4f
commit
1761911db9
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.common.core.web.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
@ -43,6 +44,7 @@ public class BaseEntity implements Serializable {
|
|||
type = "String",
|
||||
description = "创建数据的用户"
|
||||
)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
|
@ -55,6 +57,7 @@ public class BaseEntity implements Serializable {
|
|||
description = "创建数据的时间"
|
||||
)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
|
@ -66,6 +69,7 @@ public class BaseEntity implements Serializable {
|
|||
type = "String",
|
||||
description = "更新数据的用户"
|
||||
)
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
|
@ -78,6 +82,7 @@ public class BaseEntity implements Serializable {
|
|||
description = "更新数据的时间"
|
||||
)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue