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
82ed2099
Commit
82ed2099
authored
Mar 11, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新消息已读逻辑调整
parent
0527b47c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
core/src/main/java/com/wecloud/im/enums/ReadMsgStatusEnum.java
+40
-0
core/src/main/java/com/wecloud/im/service/impl/ImInboxServiceImpl.java
+2
-0
No files found.
core/src/main/java/com/wecloud/im/enums/ReadMsgStatusEnum.java
0 → 100644
View file @
82ed2099
package
com
.
wecloud
.
im
.
enums
;
import
io.geekidea.springbootplus.framework.common.enums.BaseEnum
;
/**
* @Author wenzhida
* @Date 2022/3/11 16:24
* @Description 消息是否已读枚举
*/
public
enum
ReadMsgStatusEnum
implements
BaseEnum
{
/**
* 0 - 未读
*/
UNREAD
(
0
,
"未读"
),
/**
* 1 - 已读
*/
READ
(
1
,
"已读"
);
ReadMsgStatusEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
private
final
Integer
code
;
private
final
String
desc
;
@Override
public
Integer
getCode
()
{
return
this
.
code
;
}
@Override
public
String
getDesc
()
{
return
this
.
desc
;
}
}
core/src/main/java/com/wecloud/im/service/impl/ImInboxServiceImpl.java
View file @
82ed2099
...
@@ -8,6 +8,7 @@ import com.wecloud.im.entity.ImConversationMembers;
...
@@ -8,6 +8,7 @@ import com.wecloud.im.entity.ImConversationMembers;
import
com.wecloud.im.entity.ImInbox
;
import
com.wecloud.im.entity.ImInbox
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.entity.ImMessageOnlineSend
;
import
com.wecloud.im.entity.ImMessageOnlineSend
;
import
com.wecloud.im.enums.ReadMsgStatusEnum
;
import
com.wecloud.im.mapper.ImInboxMapper
;
import
com.wecloud.im.mapper.ImInboxMapper
;
import
com.wecloud.im.param.ImMsgReceivedStatusUpdate
;
import
com.wecloud.im.param.ImMsgReceivedStatusUpdate
;
import
com.wecloud.im.param.MsgReadStatusUpdateParam
;
import
com.wecloud.im.param.MsgReadStatusUpdateParam
;
...
@@ -160,6 +161,7 @@ public class ImInboxServiceImpl extends BaseServiceImpl<ImInboxMapper, ImInbox>
...
@@ -160,6 +161,7 @@ public class ImInboxServiceImpl extends BaseServiceImpl<ImInboxMapper, ImInbox>
// 获取该用户该会话所有未读消息 msgId 列表
// 获取该用户该会话所有未读消息 msgId 列表
List
<
ImInbox
>
imInboxList
=
this
.
list
(
new
QueryWrapper
<
ImInbox
>().
lambda
()
List
<
ImInbox
>
imInboxList
=
this
.
list
(
new
QueryWrapper
<
ImInbox
>().
lambda
()
.
eq
(
ImInbox:
:
getFkConversationId
,
param
.
getConversationId
())
.
eq
(
ImInbox:
:
getFkConversationId
,
param
.
getConversationId
())
.
eq
(
ImInbox:
:
getReadMsgStatus
,
ReadMsgStatusEnum
.
UNREAD
.
getCode
())
.
le
(
ImInbox:
:
getFkMsgId
,
param
.
getMsgIdEnd
())
.
le
(
ImInbox:
:
getFkMsgId
,
param
.
getMsgIdEnd
())
.
eq
(
ImInbox:
:
getReceiver
,
currentClient
.
getId
()));
.
eq
(
ImInbox:
:
getReceiver
,
currentClient
.
getId
()));
if
(
CollectionUtils
.
isEmpty
(
imInboxList
))
{
if
(
CollectionUtils
.
isEmpty
(
imInboxList
))
{
...
...
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