Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
log-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
log-platform
Commits
56820a34
Commit
56820a34
authored
Nov 30, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口访问异步消息保存
parent
af356211
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
log-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
.../xhx/base/framework/interceptor/AuthTokenServiceImpl.java
+6
-2
No files found.
log-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
View file @
56820a34
...
@@ -19,6 +19,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -19,6 +19,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -92,10 +93,13 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
...
@@ -92,10 +93,13 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
Claims
claims
=
parseToken
(
token
);
Claims
claims
=
parseToken
(
token
);
String
uuid
=
(
String
)
claims
.
get
(
SysConstains
.
LOGIN_USER_KEY
);
String
uuid
=
(
String
)
claims
.
get
(
SysConstains
.
LOGIN_USER_KEY
);
String
userKey
=
getTokenKey
(
uuid
);
String
userKey
=
getTokenKey
(
uuid
);
cacheService
.
select
(
portalDb
);
/*
cacheService.select(portalDb);
String userStr = cacheService.get(userKey);
String userStr = cacheService.get(userKey);
cacheService
.
select
(
db
);
cacheService.select(db);*/
RedisTemplate
<
String
,
String
>
redisTemplate
=
cacheService
.
selectDbRedisTemplate
(
portalDb
);
String
userStr
=
redisTemplate
.
opsForValue
().
get
(
userKey
);
if
(
StringUtils
.
isNotEmpty
(
userStr
))
{
if
(
StringUtils
.
isNotEmpty
(
userStr
))
{
UserEntity
userEntity
=
JSONObject
.
parseObject
(
userStr
,
UserEntity
.
class
);
UserEntity
userEntity
=
JSONObject
.
parseObject
(
userStr
,
UserEntity
.
class
);
userEntity
.
setToken
(
token
);
userEntity
.
setToken
(
token
);
...
...
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