Commit 9b26c067 by zhangxingmin

push

parent 7881bcd8
...@@ -14,6 +14,7 @@ import org.springframework.context.annotation.Configuration; ...@@ -14,6 +14,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
@Slf4j @Slf4j
@Configuration @Configuration
...@@ -57,12 +58,18 @@ public class CsfMybatisPlusConfig { ...@@ -57,12 +58,18 @@ public class CsfMybatisPlusConfig {
if (getFieldValByName("creatorName", metaObject) == null) { if (getFieldValByName("creatorName", metaObject) == null) {
this.strictInsertFill(metaObject, "creatorName", String.class, authUserDto.getRealName()); 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) { if (getFieldValByName("updaterId", metaObject) == null) {
this.strictInsertFill(metaObject, "updaterId", String.class, authUserDto.getUserBizId()); this.strictInsertFill(metaObject, "updaterId", String.class, authUserDto.getUserBizId());
} }
if (getFieldValByName("updaterName", metaObject) == null) { if (getFieldValByName("updaterName", metaObject) == null) {
this.strictInsertFill(metaObject, "updaterName", String.class, authUserDto.getRealName()); 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 { ...@@ -83,6 +90,9 @@ public class CsfMybatisPlusConfig {
if (getFieldValByName("updaterName", metaObject) == null) { if (getFieldValByName("updaterName", metaObject) == null) {
this.strictUpdateFill(metaObject, "updaterName", String.class, authUserDto.getRealName()); 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 { ...@@ -189,11 +189,13 @@ public class Commission implements Serializable {
/** /**
* 创建时间 * 创建时间
*/ */
@TableField(value = "create_time", fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
private Date updateTime; private Date updateTime;
@TableField(exist = false) @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