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
112c566a
Commit
112c566a
authored
Mar 21, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改权限注解
parent
a2423790
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
UserEmpower.java
...yeejoin/amos/boot/module/hygf/api/config/UserEmpower.java
+4
-0
UserEmpowerInterceptor.java
...s/boot/module/hygf/api/config/UserEmpowerInterceptor.java
+18
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/config/UserEmpower.java
View file @
112c566a
...
...
@@ -23,6 +23,10 @@ public @interface UserEmpower {
*/
String
[]
field
();
/**
* @param 经销商字段(Field1,Field2)
*/
String
[]
dealerField
();
/**
* @param 每个字段运算符( in,like,likeLeft,likeRight,eq)
*/
String
[]
fieldConditions
()
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/config/UserEmpowerInterceptor.java
View file @
112c566a
...
...
@@ -45,9 +45,10 @@ public class UserEmpowerInterceptor implements Interceptor {
@Override
public
Object
intercept
(
Invocation
invocation
)
throws
Throwable
{
try
{
StdUserEmpower
orgCode
=(
StdUserEmpower
)
redisUtils
.
get
(
"Emp_"
+
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()));
if
(
orgCode
.
isFlag
()){
StatementHandler
statementHandler
=
PluginUtils
.
realTarget
(
invocation
.
getTarget
());
MetaObject
metaObject
=
SystemMetaObject
.
forObject
(
statementHandler
);
MappedStatement
mappedStatement
=
(
MappedStatement
)
metaObject
.
getValue
(
"delegate.mappedStatement"
);
...
...
@@ -59,7 +60,6 @@ public class UserEmpowerInterceptor implements Interceptor {
}
//StdUserEmpower orgCode = UserEmpowerThreadLocal.getDataAuthRule();
StdUserEmpower
orgCode
=(
StdUserEmpower
)
redisUtils
.
get
(
"Emp_"
+
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()));
if
(
orgCode
!=
null
&&
orgCode
.
isFlag
()){
//获取字段
...
...
@@ -119,6 +119,21 @@ public class UserEmpowerInterceptor implements Interceptor {
}
else
{
return
invocation
.
proceed
();
}
}
else
{
//经销商
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
BadRequest
(
"权限认证失败!"
);
...
...
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