Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_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
赵啸非
smart_gov_platform
Commits
fd1f43a9
Commit
fd1f43a9
authored
Aug 05, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加删除站点后通知门户服务更新
parent
7923bd7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
portal-manager/src/main/java/com/mortals/xhx/module/user/service/impl/UserServiceImpl.java
...mortals/xhx/module/user/service/impl/UserServiceImpl.java
+13
-8
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/user/service/impl/UserServiceImpl.java
View file @
fd1f43a9
...
...
@@ -243,16 +243,9 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
this
.
update
(
userEntity
,
context
);
//更新redis中 所有用户session信息
Set
<
String
>
keys
=
cacheService
.
scan
(
Constant
.
LOGIN_TOKEN_KEY
+
userEntity
.
getId
());
keys
.
forEach
(
item
->{
String
token
=
StrUtil
.
subAfter
(
item
,
Constant
.
LOGIN_TOKEN_KEY
+
userEntity
.
getId
()
+
":"
,
false
);
userEntity
.
setToken
(
token
);
userEntity
.
setExpireTime
(
DateUtils
.
addCurrDate
(
7
).
getTime
());
authTokenService
.
setUser
(
userEntity
);
});
updateRedisUserSession
(
userEntity
);
}
@Override
protected
void
saveAfter
(
UserEntity
entity
,
Context
context
)
throws
AppException
{
super
.
saveAfter
(
entity
,
context
);
...
...
@@ -286,7 +279,19 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
userEntity
.
setId
(
item
.
getId
());
userEntity
.
setSiteIds
(
siteIds
);
this
.
dao
.
update
(
userEntity
);
updateRedisUserSession
(
userEntity
);
}
});
}
private
void
updateRedisUserSession
(
UserEntity
userEntity
)
{
Set
<
String
>
keys
=
cacheService
.
scan
(
Constant
.
LOGIN_TOKEN_KEY
+
userEntity
.
getId
());
keys
.
forEach
(
key
->
{
String
token
=
StrUtil
.
subAfter
(
key
,
Constant
.
LOGIN_TOKEN_KEY
+
userEntity
.
getId
()
+
":"
,
false
);
userEntity
.
setToken
(
token
);
userEntity
.
setExpireTime
(
DateUtils
.
addCurrDate
(
7
).
getTime
());
authTokenService
.
setUser
(
userEntity
);
});
}
}
\ No newline at end of file
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