Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-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
赵啸非
attendance-performance-platform
Commits
be0084ba
Commit
be0084ba
authored
Nov 30, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改redis认证方式
parent
885c8a4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
.../xhx/base/framework/interceptor/AuthTokenServiceImpl.java
+6
-3
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java
View file @
be0084ba
...
...
@@ -20,6 +20,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -96,9 +97,11 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
String
uuid
=
(
String
)
claims
.
get
(
SysConstains
.
LOGIN_USER_KEY
);
String
userKey
=
getTokenKey
(
uuid
);
//cacheService.select(portalDb);
cacheService
.
select
(
0
);
String
userStr
=
cacheService
.
get
(
userKey
);
cacheService
.
select
(
db
);
// cacheService.select(0);
RedisTemplate
<
String
,
String
>
redisTemplate
=
cacheService
.
selectDbRedisTemplate
(
0
);
String
userStr
=
redisTemplate
.
opsForValue
().
get
(
userKey
);
// String userStr = cacheService.get(userKey);
// cacheService.select(db);
if
(
StringUtils
.
isNotEmpty
(
userStr
))
{
UserEntity
userEntity
=
JSONObject
.
parseObject
(
userStr
,
UserEntity
.
class
);
//与本地转换
...
...
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