1. common 相关

This commit is contained in:
zhaowenyuan 2024-07-01 11:42:47 +08:00
parent 00a0ec2a2a
commit 9648d48ae3
2 changed files with 5 additions and 5 deletions

View File

@ -102,7 +102,7 @@ public class SecurityContextHolder
return Convert.toLong(get(SecurityConstants.DEPT_ID), 0L); return Convert.toLong(get(SecurityConstants.DEPT_ID), 0L);
} }
public static void setDeptId(Long deptId) public static void setDeptId(String deptId)
{ {
set(SecurityConstants.DEPT_ID, deptId); set(SecurityConstants.DEPT_ID, deptId);
} }

View File

@ -28,8 +28,8 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
} }
// 修改人, 创建人 // 修改人, 创建人
// 用于填充 创建人以及修改人 // 用于填充 创建人以及修改人
// String userName = SecurityContextHolder.getUserName(); String userName = SecurityContextHolder.getUserName();
String userName = "system"; // String userName = "system";
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now()); this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
this.strictInsertFill(metaObject, "createBy", String.class, userName); this.strictInsertFill(metaObject, "createBy", String.class, userName);
} }
@ -41,8 +41,8 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
@Override @Override
public void updateFill(MetaObject metaObject) { public void updateFill(MetaObject metaObject) {
log.debug("mybatis plus start update fill ...."); log.debug("mybatis plus start update fill ....");
// String userName = SecurityContextHolder.getUserName(); String userName = SecurityContextHolder.getUserName();
String userName = "system"; // String userName = "system";
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
this.strictUpdateFill(metaObject, "updateBy", String.class, userName); this.strictUpdateFill(metaObject, "updateBy", String.class, userName);
} }