Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
38733220
Commit
38733220
authored
Mar 20, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
a7f8d6db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
yd-csf-service/src/main/java/com/yd/csf/service/config/CsfMybatisPlusConfig.java
+12
-2
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/config/CsfMybatisPlusConfig.java
View file @
38733220
...
@@ -41,7 +41,12 @@ public class CsfMybatisPlusConfig {
...
@@ -41,7 +41,12 @@ public class CsfMybatisPlusConfig {
@Override
@Override
public
void
insertFill
(
MetaObject
metaObject
)
{
public
void
insertFill
(
MetaObject
metaObject
)
{
//获取Security上下文当前用户的登录信息
//获取Security上下文当前用户的登录信息
AuthUserDto
authUserDto
=
SecurityUtil
.
getCurrentLoginUser
();
AuthUserDto
authUserDto
=
null
;
try
{
authUserDto
=
SecurityUtil
.
getCurrentLoginUser
();
}
catch
(
Exception
e
)
{
log
.
info
(
"获取Security上下文当前用户的登录信息失败,{}"
,
e
.
getMessage
());
}
log
.
info
(
"metaObjectHandler=======insertFill自动填充获取用户信息:{}"
,
JSON
.
toJSONString
(
authUserDto
));
log
.
info
(
"metaObjectHandler=======insertFill自动填充获取用户信息:{}"
,
JSON
.
toJSONString
(
authUserDto
));
if
(
authUserDto
!=
null
)
{
if
(
authUserDto
!=
null
)
{
//自动注入创建人和创建用户名
//自动注入创建人和创建用户名
...
@@ -53,7 +58,12 @@ public class CsfMybatisPlusConfig {
...
@@ -53,7 +58,12 @@ public class CsfMybatisPlusConfig {
@Override
@Override
public
void
updateFill
(
MetaObject
metaObject
)
{
public
void
updateFill
(
MetaObject
metaObject
)
{
//获取Security上下文当前用户的登录信息
//获取Security上下文当前用户的登录信息
AuthUserDto
authUserDto
=
SecurityUtil
.
getCurrentLoginUser
();
AuthUserDto
authUserDto
=
null
;
try
{
authUserDto
=
SecurityUtil
.
getCurrentLoginUser
();
}
catch
(
Exception
e
)
{
log
.
info
(
"获取Security上下文当前用户的登录信息失败,{}"
,
e
.
getMessage
());
}
log
.
info
(
"metaObjectHandler=======updateFill自动填充获取用户信息:{}"
,
JSON
.
toJSONString
(
authUserDto
));
log
.
info
(
"metaObjectHandler=======updateFill自动填充获取用户信息:{}"
,
JSON
.
toJSONString
(
authUserDto
));
if
(
authUserDto
!=
null
)
{
if
(
authUserDto
!=
null
)
{
//自动注入更新人和更新用户名
//自动注入更新人和更新用户名
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment