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
9c398c8e
Commit
9c398c8e
authored
Mar 14, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群@功能
parent
82ed2099
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
2 deletions
+27
-2
core/src/main/java/com/wecloud/im/controller/ImConversationController.java
+1
-1
core/src/main/java/com/wecloud/im/param/ChatContentVo.java
+13
-0
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+0
-1
core/src/main/java/com/wecloud/im/service/impl/ImMessageServiceImpl.java
+1
-0
core/src/main/java/com/wecloud/im/vo/ConversationVo.java
+6
-0
core/src/main/resources/mapper/ImConversationMapper.xml
+6
-0
No files found.
core/src/main/java/com/wecloud/im/controller/ImConversationController.java
View file @
9c398c8e
...
...
@@ -179,7 +179,7 @@ public class ImConversationController extends BaseController {
*/
@PostMapping
(
"/getList"
)
@ApiOperation
(
value
=
"查询加入的会话列表"
,
notes
=
"查询用户加入的非隐藏状态的会话列表 与每个会话的未读条数 成员"
)
public
ApiResult
<
List
<
ConversationVo
>>
getMyImConversationListAndMsgCount
()
throws
Exception
{
public
ApiResult
<
List
<
ConversationVo
>>
getMyImConversationListAndMsgCount
()
{
List
<
ConversationVo
>
conversationList
=
imConversationService
.
getMyImConversationListAndMsgCount
();
return
ApiResult
.
ok
(
conversationList
);
}
...
...
core/src/main/java/com/wecloud/im/param/ChatContentVo.java
View file @
9c398c8e
...
...
@@ -40,6 +40,11 @@ public class ChatContentVo extends BaseRequest {
*/
String
text
;
/**
* 被@人clientId, 多人用英文逗号分隔
*/
String
at
;
public
PushVO
getPush
()
{
return
JsonUtils
.
beanCopyDeep
(
this
.
get
(
"push"
),
PushVO
.
class
);
}
...
...
@@ -73,6 +78,14 @@ public class ChatContentVo extends BaseRequest {
this
.
text
=
text
;
}
public
String
getAt
()
{
return
at
;
}
public
void
setAt
(
String
at
)
{
this
.
at
=
at
;
}
@Override
public
String
getReqId
()
{
return
reqId
;
...
...
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
9c398c8e
...
...
@@ -1108,7 +1108,6 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
// 查询会话的最后一条消息
OfflineMsgDto
lastMsg
=
imMessageService
.
getLastMsgByConversationId
(
myconversationlistvo
.
getId
());
myconversationlistvo
.
setLastMsg
(
lastMsg
);
myImConversationListAndMsgCountNew
.
add
(
myconversationlistvo
);
}
...
...
core/src/main/java/com/wecloud/im/service/impl/ImMessageServiceImpl.java
View file @
9c398c8e
...
...
@@ -195,6 +195,7 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
imMessage
.
setSystemFlag
(
false
);
imMessage
.
setSendStatus
(
2
);
imMessage
.
setMsgType
(
data
.
getType
());
imMessage
.
setAt
(
data
.
getAt
());
imMessage
.
setFkConversationId
(
data
.
getToConversation
());
this
.
save
(
imMessage
);
return
imMessage
;
...
...
core/src/main/java/com/wecloud/im/vo/ConversationVo.java
View file @
9c398c8e
...
...
@@ -61,6 +61,9 @@ public class ConversationVo implements Serializable {
@ApiModelProperty
(
"会话最后一条消息"
)
private
OfflineMsgDto
lastMsg
;
@ApiModelProperty
(
"是否被@ true-是 false-否"
)
private
Boolean
isBeAt
;
/**
* 禁言开关
* @see com.wecloud.im.enums.MutedEnum
...
...
@@ -68,4 +71,7 @@ public class ConversationVo implements Serializable {
@ApiModelProperty
(
"禁言开关 1-未禁言 2-禁言"
)
private
Integer
muted
;
@ApiModelProperty
(
"禁言开关 1-未禁言 2-禁言"
)
private
Integer
beAtCount
;
}
core/src/main/resources/mapper/ImConversationMapper.xml
View file @
9c398c8e
...
...
@@ -36,6 +36,12 @@
WHERE im_inbox.fk_conversation_id = imConversation.id
AND im_inbox.receiver = #{currentClientId}
AND im_inbox.read_msg_status = 0) AS msg_not_read_count,
(SELECT COUNT(*)
FROM im_inbox INNER JOIN im_message ON im_inbox.fk_msg_id = im_message.id
WHERE im_inbox.fk_conversation_id = imConversation.id
AND im_inbox.receiver = #{currentClientId}
AND im_inbox.read_msg_status = 0
AND FIND_IN_SET(#{currentClientId},im_message.`at`) > 0) AS beAtCount,
(
SELECT GROUP_CONCAT(im_client.client_id)
FROM im_conversation_members AS im_conversation_members
...
...
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