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
2b4d3b48
Commit
2b4d3b48
authored
Nov 07, 2017
by
Java—红包—徐 然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改新的注销逻辑
parent
7b1f65a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
SessionServiceImpl.java
...ntgroup/xyqb/service/session/impl/SessionServiceImpl.java
+5
-10
No files found.
src/main/java/cn/quantgroup/xyqb/service/session/impl/SessionServiceImpl.java
View file @
2b4d3b48
...
@@ -181,21 +181,16 @@ public class SessionServiceImpl implements ISessionService {
...
@@ -181,21 +181,16 @@ public class SessionServiceImpl implements ISessionService {
@Override
@Override
public
void
deleteByUserId
(
long
userId
)
{
public
void
deleteByUserId
(
long
userId
)
{
String
pattern
=
Constants
.
Session
.
USER_SESSION_ID_CACHE
+
":"
+
String
.
valueOf
(
userId
)
+
":*"
;
Set
<
String
>
keys
=
stringRedisTemplate
.
keys
(
pattern
);
if
(!
CollectionUtils
.
isEmpty
(
keys
))
{
log
.
info
(
"删除用户userId={}的缓存信息,个数:{},keys={}"
,
userId
,
keys
.
size
(),
Joiner
.
on
(
","
).
join
(
keys
));
}
/*
Set useIdKeys = stringRedisTemplate.opsForSet().members(Constants.Session.USER_SESSION_KEY_SET + userId);
Set
useIdKeys
=
stringRedisTemplate
.
opsForSet
().
members
(
Constants
.
Session
.
USER_SESSION_KEY_SET
+
userId
);
if
(!
CollectionUtils
.
isEmpty
(
useIdKeys
))
{
if
(!
CollectionUtils
.
isEmpty
(
useIdKeys
))
{
useIdKeys
.
forEach
(
key
->
{
useIdKeys
.
forEach
(
key
->
{
log.info("删除用户userId={}的缓存信息",userId);
log
.
info
(
"删除用户userId={}的缓存信息"
,
userId
);
stringRedisTemplate
.
delete
(
String
.
valueOf
(
key
));
stringRedisTemplate
.
delete
(
String
.
valueOf
(
key
));
});
});
}*/
stringRedisTemplate
.
delete
(
Constants
.
Session
.
USER_SESSION_KEY_SET
+
userId
);
}
}
}
}
}
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