Commit 9b26c067 by zhangxingmin

push

parent 7881bcd8
......@@ -14,6 +14,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import java.time.LocalDateTime;
import java.util.Date;
@Slf4j
@Configuration
......@@ -57,12 +58,18 @@ public class CsfMybatisPlusConfig {
if (getFieldValByName("creatorName", metaObject) == null) {
this.strictInsertFill(metaObject, "creatorName", String.class, authUserDto.getRealName());
}
if (getFieldValByName("createTime", metaObject) == null) {
this.strictInsertFill(metaObject, "createTime", Date.class, new Date());
}
if (getFieldValByName("updaterId", metaObject) == null) {
this.strictInsertFill(metaObject, "updaterId", String.class, authUserDto.getUserBizId());
}
if (getFieldValByName("updaterName", metaObject) == null) {
this.strictInsertFill(metaObject, "updaterName", String.class, authUserDto.getRealName());
}
if (getFieldValByName("updateTime", metaObject) == null) {
this.strictInsertFill(metaObject, "updateTime", Date.class, new Date());
}
}
}
......@@ -83,6 +90,9 @@ public class CsfMybatisPlusConfig {
if (getFieldValByName("updaterName", metaObject) == null) {
this.strictUpdateFill(metaObject, "updaterName", String.class, authUserDto.getRealName());
}
if (getFieldValByName("updateTime", metaObject) == null) {
this.strictUpdateFill(metaObject, "updateTime", Date.class, new Date());
}
}
}
};
......
......@@ -189,11 +189,13 @@ public class Commission implements Serializable {
/**
* 创建时间
*/
@TableField(value = "create_time", fill = FieldFill.INSERT)
private Date createTime;
/**
* 更新时间
*/
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@TableField(exist = false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment