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
f29df899
Commit
f29df899
authored
Apr 15, 2025
by
xuepeng.chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登出 删除token
parent
a8221d51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
AppletServiceImpl.java
...b/service/middleoffice/applet/impl/AppletServiceImpl.java
+8
-8
No files found.
src/main/java/cn/quantgroup/xyqb/service/middleoffice/applet/impl/AppletServiceImpl.java
View file @
f29df899
...
...
@@ -207,14 +207,14 @@ public class AppletServiceImpl implements IAppletService {
wechatBindLogRepository
.
save
(
wechatBindLog
);
}
// 删除微信关联记录后,清除微信渠道的登陆token
//
if(org.apache.commons.lang3.StringUtils.isNotEmpty(unbindParam.getWechatChannelId())){
//
List<String> wechatChannelIds = Arrays.stream(unbindParam.getWechatChannelId().split(",")).collect(Collectors.toList());
//
for (String wechatChannelId : wechatChannelIds) {
//
LoginProperties loginProperties = new LoginProperties(1, Long.valueOf(wechatChannelId), unbindParam.getTenantId());
//
sessionService.deleteWechatSession(unbindParam.getUserId(),loginProperties,unbindParam.getTenantId());
//
log.info("微信解绑成功,清除微信的登陆token,userId:{},wechatChannelId:{}", unbindParam.getUserId(),wechatChannelId);
//
}
//
}
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotEmpty
(
unbindParam
.
getWechatChannelId
())){
List
<
String
>
wechatChannelIds
=
Arrays
.
stream
(
unbindParam
.
getWechatChannelId
().
split
(
","
)).
collect
(
Collectors
.
toList
());
for
(
String
wechatChannelId
:
wechatChannelIds
)
{
LoginProperties
loginProperties
=
new
LoginProperties
(
1
,
Long
.
valueOf
(
wechatChannelId
),
unbindParam
.
getTenantId
());
sessionService
.
deleteWechatSession
(
unbindParam
.
getUserId
(),
loginProperties
,
unbindParam
.
getTenantId
());
log
.
info
(
"微信解绑成功,清除微信的登陆token,userId:{},wechatChannelId:{}"
,
unbindParam
.
getUserId
(),
wechatChannelId
);
}
}
User
user
=
userService
.
findById
(
unbindParam
.
getUserId
(),
unbindParam
.
getTenantId
());
// 老的微信登录的时候用的是下边的方式,删除的时候也只能这么删
LoginProperties
loginProperties
=
LoginProperties
.
builder
()
...
...
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