Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
116f3ac6
Commit
116f3ac6
authored
Jul 15, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门非空条件判断
parent
2f6e6736
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java
+0
-19
src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
+5
-1
No files found.
src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java
View file @
116f3ac6
...
...
@@ -6,9 +6,6 @@ import java.util.List;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
com.ruoyi.project.system.dept.domain.Dept
;
import
com.ruoyi.project.system.user.domain.User
;
/**
* Bean 工具类
*
...
...
@@ -122,20 +119,4 @@ public class BeanUtils
{
return
m1
.
substring
(
BEAN_METHOD_PROP_INDEX
).
equals
(
m2
.
substring
(
BEAN_METHOD_PROP_INDEX
));
}
public
static
void
main
(
String
[]
args
)
{
User
user
=
new
User
();
User
zhen
=
new
User
();
zhen
.
setUserName
(
"测试名称"
);
Dept
dept
=
new
Dept
();
dept
.
setDeptId
(
11L
);
dept
.
setDeptName
(
"测试部门"
);
zhen
.
setDept
(
dept
);
BeanUtils
.
copyBeanProp
(
user
,
zhen
);
System
.
out
.
println
(
user
.
getDept
().
getDeptName
());
}
}
src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
View file @
116f3ac6
...
...
@@ -98,7 +98,11 @@ public class LogAspect
if
(
currentUser
!=
null
)
{
operLog
.
setOperName
(
currentUser
.
getLoginName
());
operLog
.
setDeptName
(
currentUser
.
getDept
().
getDeptName
());
if
(
StringUtils
.
isNotNull
(
currentUser
.
getDept
())
&&
StringUtils
.
isEmpty
(
currentUser
.
getDept
().
getDeptName
()))
{
operLog
.
setDeptName
(
currentUser
.
getDept
().
getDeptName
());
}
}
if
(
e
!=
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