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
f27e5fe4
Commit
f27e5fe4
authored
Oct 12, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未读消息数量
parent
27001ba9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
core/src/main/java/com/wecloud/im/service/impl/ImInboxServiceImpl.java
+13
-7
No files found.
core/src/main/java/com/wecloud/im/service/impl/ImInboxServiceImpl.java
View file @
f27e5fe4
package
com
.
wecloud
.
im
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.wecloud.im.entity.ImApplication
;
import
com.wecloud.im.entity.ImClient
;
import
com.wecloud.im.entity.ImInbox
;
import
com.wecloud.im.mapper.ImInboxMapper
;
...
...
@@ -10,12 +11,14 @@ import com.wecloud.im.param.UpdateMsgReadStatusByConversationParam;
import
com.wecloud.im.service.ImClientService
;
import
com.wecloud.im.service.ImInboxService
;
import
com.wecloud.im.vo.ConversationCountVo
;
import
com.wecloud.im.ws.enums.MsgTypeEnum
;
import
io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.HashMap
;
import
java.util.List
;
/**
...
...
@@ -37,11 +40,15 @@ public class ImInboxServiceImpl extends BaseServiceImpl<ImInboxMapper, ImInbox>
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
updateImMsgReceived
(
ImMsgReceivedStatusUpdate
imMsgReceivedUpdate
)
{
ImClient
curentClient
=
imClientService
.
getCurrentClient
();
ImClient
cur
r
entClient
=
imClientService
.
getCurrentClient
();
// 修改已接收状态
// imInboxMapper.updateImMsgReceivedByIds(curentClient.getId(), imMsgReceivedUpdate.getMsgIds());
// 修改已读状态
imInboxMapper
.
updateImMsgReadByIds
(
curentClient
.
getId
(),
imMsgReceivedUpdate
.
getMsgIds
());
imInboxMapper
.
updateImMsgReceivedByIds
(
currentClient
.
getId
(),
imMsgReceivedUpdate
.
getMsgIds
());
// 是否同时修改为已读状态
if
(
imMsgReceivedUpdate
.
getReadStatus
())
{
MsgReadStatusUpdateParam
msgReadStatusUpdateParam
=
new
MsgReadStatusUpdateParam
();
msgReadStatusUpdateParam
.
setMsgIds
(
imMsgReceivedUpdate
.
getMsgIds
());
this
.
updateImMsgRead
(
msgReadStatusUpdateParam
);
}
return
true
;
}
...
...
@@ -64,10 +71,9 @@ public class ImInboxServiceImpl extends BaseServiceImpl<ImInboxMapper, ImInbox>
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
updateImMsgRead
(
MsgReadStatusUpdateParam
msgReadStatusUpdateParam
)
{
// 小虎豆不做单条消息修改已读
ImClient
curentClient
=
imClientService
.
getCurrentClient
();
ImClient
currentClient
=
imClientService
.
getCurrentClient
();
// 修改已读状态
imInboxMapper
.
updateImMsgReadByIds
(
curentClient
.
getId
(),
msgReadStatusUpdateParam
.
getMsgIds
());
imInboxMapper
.
updateImMsgReadByIds
(
cur
r
entClient
.
getId
(),
msgReadStatusUpdateParam
.
getMsgIds
());
return
true
;
}
...
...
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