1. common 相关
This commit is contained in:
parent
00a0ec2a2a
commit
9648d48ae3
|
|
@ -102,7 +102,7 @@ public class SecurityContextHolder
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
|
|||
}
|
||||
// 修改人, 创建人
|
||||
// 用于填充 创建人以及修改人
|
||||
// String userName = SecurityContextHolder.getUserName();
|
||||
String userName = "system";
|
||||
String userName = SecurityContextHolder.getUserName();
|
||||
// String userName = "system";
|
||||
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
|
||||
this.strictInsertFill(metaObject, "createBy", String.class, userName);
|
||||
}
|
||||
|
|
@ -41,8 +41,8 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
|
|||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
log.debug("mybatis plus start update fill ....");
|
||||
// String userName = SecurityContextHolder.getUserName();
|
||||
String userName = "system";
|
||||
String userName = SecurityContextHolder.getUserName();
|
||||
// String userName = "system";
|
||||
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
|
||||
this.strictUpdateFill(metaObject, "updateBy", String.class, userName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue