Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
6256cfa3
Commit
6256cfa3
authored
Jan 05, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.权限拦截器优化
parent
e798ceaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
PermissionInterceptor.java
...s/boot/biz/common/interceptors/PermissionInterceptor.java
+4
-4
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/interceptors/PermissionInterceptor.java
View file @
6256cfa3
...
...
@@ -76,15 +76,15 @@ public class PermissionInterceptor implements Interceptor {
PermissionInterceptorContext
.
clean
();
return
invocation
.
proceed
();
}
if
(!
ValidationUtil
.
isEmpty
(
dataAuth
)){
dataAuthRule
=
!
ValidationUtil
.
isEmpty
(
dataAuthRule
)
?
dataAuthRule
:
dataAuth
.
interfacePath
();
}
// 数据权限地址为空返回空数据
if
(
ValidationUtil
.
isEmpty
(
dataAuth
.
interfacePath
())
&&
ValidationUtil
.
isEmpty
(
dataAuthRule
))
{
if
(
ValidationUtil
.
isEmpty
(
dataAuthRule
))
{
// method.getReturnType().isPrimitive() = true 是count语句
PermissionInterceptorContext
.
clean
();
return
method
.
getReturnType
().
isPrimitive
()
?
invocation
.
proceed
()
:
null
;
}
dataAuthRule
=
ValidationUtil
.
isEmpty
(
dataAuth
.
interfacePath
())
?
dataAuthRule
:
dataAuth
.
interfacePath
();
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
()
,
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ValidationUtil
.
isEmpty
(
reginParam
)
||
ValidationUtil
.
isEmpty
(
reginParam
.
getUserModel
()))
{
...
...
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