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
7e3436b1
Commit
7e3436b1
authored
Jul 24, 2023
by
王亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set default 0 in inner filter.
parent
62250a61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
InnerInterceptor.java
...main/java/cn/quantgroup/xyqb/filter/InnerInterceptor.java
+1
-4
XyqbSessionContextHolder.java
.../cn/quantgroup/xyqb/session/XyqbSessionContextHolder.java
+5
-0
No files found.
src/main/java/cn/quantgroup/xyqb/filter/InnerInterceptor.java
View file @
7e3436b1
...
...
@@ -37,10 +37,7 @@ public class InnerInterceptor implements HandlerInterceptor {
if
(
StringUtils
.
isEmpty
(
tenantId
))
{
throw
new
BizException
(
BizExceptionEnum
.
UN_EXIT_TENANT_ID
);
}
if
(
StringUtils
.
isEmpty
(
registeredFrom
))
{
//TODO:唐峰,先默认给0
registeredFrom
=
"0"
;
}
if
(
StringUtils
.
isEmpty
(
stmsToken
))
{
throw
new
BizException
(
BizExceptionEnum
.
UN_EXIT_STMS_TOKEN
);
}
...
...
src/main/java/cn/quantgroup/xyqb/session/XyqbSessionContextHolder.java
View file @
7e3436b1
...
...
@@ -95,6 +95,11 @@ public class XyqbSessionContextHolder {
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
tenantId
=
request
.
getHeader
(
Constants
.
X_AUTH_TENANT
);
String
registered_from
=
request
.
getHeader
(
Constants
.
X_AUTH_FROM
);
if
(
cn
.
quantgroup
.
xyqb
.
util
.
StringUtils
.
isEmpty
(
registered_from
))
{
//TODO:唐峰,先默认给0
registered_from
=
"0"
;
}
String
ip
=
IpUtil
.
getRemoteIP
(
request
);
sessionStruct
.
setTenantId
(
Integer
.
valueOf
(
tenantId
));
sessionStruct
.
setRegisteredFrom
(
Long
.
valueOf
(
registered_from
));
...
...
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