Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
cc800603
Commit
cc800603
authored
Sep 28, 2025
by
常学朋
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-202509241012-stms-token-' into 'master'
还原原先的stms token See merge request
!128
parents
375534f4
02375485
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
StmsInnerInterceptor.java
.../java/cn/quantgroup/xyqb/filter/StmsInnerInterceptor.java
+3
-3
No files found.
src/main/java/cn/quantgroup/xyqb/filter/StmsInnerInterceptor.java
View file @
cc800603
...
...
@@ -54,7 +54,7 @@ public class StmsInnerInterceptor implements HandlerInterceptor {
throw
new
BizException
(
BizExceptionEnum
.
UN_EXIT_STMS_TOKEN
);
}
SessionStruct
sessionStruct
=
XyqbSessionContextHolder
.
get
Stms
XSessionFromRedis
(
stmsToken
,
Integer
.
valueOf
(
tenantId
),
StringUtils
.
isEmpty
(
registeredFrom
)
?
null
:
Long
.
valueOf
(
registeredFrom
));
SessionStruct
sessionStruct
=
XyqbSessionContextHolder
.
getXSessionFromRedis
(
stmsToken
,
Integer
.
valueOf
(
tenantId
),
StringUtils
.
isEmpty
(
registeredFrom
)
?
null
:
Long
.
valueOf
(
registeredFrom
));
log
.
info
(
"stms权限 从redis获取sessionStruct结果:{}"
,
JSONObject
.
toJSONString
(
sessionStruct
));
if
(
sessionStruct
==
null
)
{
OauthResult
oauthResult
=
stmsRemoteService
.
checkToken
(
stmsToken
);
...
...
@@ -63,13 +63,13 @@ public class StmsInnerInterceptor implements HandlerInterceptor {
String
userId
=
String
.
valueOf
(
linkedHashMap
.
get
(
"id"
));
String
userName
=
String
.
valueOf
(
linkedHashMap
.
get
(
"name"
));
sessionStruct
=
XyqbSessionContextHolder
.
initSTMSSession
(
stmsToken
,
userId
,
userName
);
sessionService
.
persistS
tmsSession
(
sessionStruct
.
getSid
(),
sessionStruct
.
getValues
(),
Constants
.
StmsSession
.
STMS_SESSION_VALID_TIME
,
sessionStruct
.
getTenantId
());
sessionService
.
persistS
ession
(
sessionStruct
.
getSid
(),
sessionStruct
.
getValues
()
,
sessionStruct
.
getTenantId
());
}
else
{
throw
new
BizException
(
BizExceptionEnum
.
UN_PERMISSION_STMS
);
}
}
else
{
//stms session续期
sessionService
.
persistS
tmsSession
(
sessionStruct
.
getSid
(),
sessionStruct
.
getValues
(),
Constants
.
StmsSession
.
STMS_SESSION_VALID_TIME
,
sessionStruct
.
getTenantId
());
sessionService
.
persistS
ession
(
sessionStruct
.
getSid
(),
sessionStruct
.
getValues
()
,
sessionStruct
.
getTenantId
());
log
.
info
(
"stms权限 sessionStruct续期完成:{}"
,
JSONObject
.
toJSONString
(
sessionStruct
));
}
...
...
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