Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
1af0d166
Commit
1af0d166
authored
Aug 28, 2020
by
RuoYi
Browse files
数据权限判断对象类型
parent
4e32788b
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
View file @
1af0d166
...
...
@@ -142,8 +142,12 @@ public class DataScopeAspect
if
(
StringUtils
.
isNotBlank
(
sqlString
.
toString
()))
{
BaseEntity
baseEntity
=
(
BaseEntity
)
joinPoint
.
getArgs
()[
0
];
baseEntity
.
getParams
().
put
(
DATA_SCOPE
,
" AND ("
+
sqlString
.
substring
(
4
)
+
")"
);
Object
params
=
joinPoint
.
getArgs
()[
0
];
if
(
StringUtils
.
isNotNull
(
params
)
&&
params
instanceof
BaseEntity
)
{
BaseEntity
baseEntity
=
(
BaseEntity
)
params
;
baseEntity
.
getParams
().
put
(
DATA_SCOPE
,
" AND ("
+
sqlString
.
substring
(
4
)
+
")"
);
}
}
}
...
...
Write
Preview
Supports
Markdown
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