Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
76659a80
Commit
76659a80
authored
Jan 20, 2022
by
hweeeeeei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug:DeviceToken重复问题
parent
6066a5d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/src/main/java/com/wecloud/im/service/impl/ImClientServiceImpl.java
+6
-4
No files found.
common/src/main/java/com/wecloud/im/service/impl/ImClientServiceImpl.java
View file @
76659a80
...
...
@@ -152,14 +152,16 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien
// 根据appKey查询appid
ImApplication
imApplication
=
imApplicationService
.
getOneByAppKey
(
curentJwtToken
.
getAppKey
());
// client登陆的时候 判断数据库内是否已经存在这个设备token,如果存在就清空旧的
this
.
removeOldToken
(
imApplication
.
getId
(),
curentJwtToken
.
getToken
());
// 清除旧client的redis缓存
ImClient
imClient
=
this
.
getOne
(
new
QueryWrapper
<
ImClient
>().
lambda
()
List
<
ImClient
>
list
=
this
.
list
(
new
QueryWrapper
<
ImClient
>().
lambda
()
.
eq
(
ImClient:
:
getFkAppid
,
imApplication
.
getId
())
.
eq
(
ImClient:
:
getDeviceToken
,
imClientDevice
.
getDeviceToken
()));
if
(
imClient
!=
null
)
{
for
(
ImClient
imClient
:
list
)
{
deleteCacheImClient
(
imClient
.
getFkAppid
(),
imClient
.
getClientId
());
// client登陆的时候 判断数据库内是否已经存在这个设备token,如果存在就清空旧的
this
.
removeOldToken
(
imApplication
.
getId
(),
curentJwtToken
.
getToken
());
}
ImClient
client
=
getCurentClient
();
...
...
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