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
494cb7e1
Commit
494cb7e1
authored
Mar 14, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群@功能
parent
7417dc4a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
bootstrap/src/test/java/io/geekidea/springbootplus/test/ImConversationTest.java
+1
-1
core/src/main/java/com/wecloud/im/mapper/ImConversationMapper.java
+1
-1
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+2
-2
core/src/main/resources/mapper/ImConversationMapper.xml
+1
-1
No files found.
bootstrap/src/test/java/io/geekidea/springbootplus/test/ImConversationTest.java
View file @
494cb7e1
...
@@ -23,7 +23,7 @@ public class ImConversationTest {
...
@@ -23,7 +23,7 @@ public class ImConversationTest {
@Test
@Test
public
void
listConversation
()
{
public
void
listConversation
()
{
List
<
ConversationVo
>
myImConversationList
=
imConversationMapper
.
getMyImConversationListAndMsgCount
(
1394579719625773056L
,
null
);
List
<
ConversationVo
>
myImConversationList
=
imConversationMapper
.
getMyImConversationListAndMsgCount
(
1394579719625773056L
,
""
,
null
);
List
<
ImConversation
>
myImConversationList1
=
imConversationMapper
.
getMyImConversationList
(
1394579719625773056L
);
List
<
ImConversation
>
myImConversationList1
=
imConversationMapper
.
getMyImConversationList
(
1394579719625773056L
);
...
...
core/src/main/java/com/wecloud/im/mapper/ImConversationMapper.java
View file @
494cb7e1
...
@@ -46,7 +46,7 @@ public interface ImConversationMapper extends BaseMapper<ImConversation> {
...
@@ -46,7 +46,7 @@ public interface ImConversationMapper extends BaseMapper<ImConversation> {
* @param currentClientId
* @param currentClientId
* @return
* @return
*/
*/
List
<
ConversationVo
>
getMyImConversationListAndMsgCount
(
@Param
(
"currentClientId"
)
Long
currentClientId
,
@Param
(
"conversationId"
)
Long
conversationId
);
List
<
ConversationVo
>
getMyImConversationListAndMsgCount
(
@Param
(
"currentClientId"
)
Long
currentClientId
,
@Param
(
"clientId"
)
String
clientId
,
@Param
(
"conversationId"
)
Long
conversationId
);
/**
/**
* 查询用户加入的所有会话
* 查询用户加入的所有会话
...
...
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
494cb7e1
...
@@ -1095,7 +1095,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -1095,7 +1095,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
try
{
try
{
ImClient
currentClient
=
imClientService
.
getCurrentClient
();
ImClient
currentClient
=
imClientService
.
getCurrentClient
();
// 查询用户加入的所有会话 与每个会话的未读条数 成员
// 查询用户加入的所有会话 与每个会话的未读条数 成员
List
<
ConversationVo
>
myImConversationListAndMsgCount
=
imConversationMapper
.
getMyImConversationListAndMsgCount
(
currentClient
.
getId
(),
null
);
List
<
ConversationVo
>
myImConversationListAndMsgCount
=
imConversationMapper
.
getMyImConversationListAndMsgCount
(
currentClient
.
getId
(),
currentClient
.
getClientId
(),
null
);
// 返回的
// 返回的
List
<
ConversationVo
>
myImConversationListAndMsgCountNew
=
new
ArrayList
<>();
List
<
ConversationVo
>
myImConversationListAndMsgCountNew
=
new
ArrayList
<>();
...
@@ -1127,7 +1127,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -1127,7 +1127,7 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
try
{
try
{
ImClient
client
=
imClientService
.
getCurrentClient
();
ImClient
client
=
imClientService
.
getCurrentClient
();
// 查询用户加入的所有会话 与每个会话的未读条数 成员
// 查询用户加入的所有会话 与每个会话的未读条数 成员
List
<
ConversationVo
>
conversationList
=
imConversationMapper
.
getMyImConversationListAndMsgCount
(
client
.
getId
(),
param
.
getId
());
List
<
ConversationVo
>
conversationList
=
imConversationMapper
.
getMyImConversationListAndMsgCount
(
client
.
getId
(),
client
.
getClientId
(),
param
.
getId
());
if
(
CollectionUtils
.
isEmpty
(
conversationList
))
{
if
(
CollectionUtils
.
isEmpty
(
conversationList
))
{
return
null
;
return
null
;
}
}
...
...
core/src/main/resources/mapper/ImConversationMapper.xml
View file @
494cb7e1
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
WHERE im_inbox.fk_conversation_id = imConversation.id
WHERE im_inbox.fk_conversation_id = imConversation.id
AND im_inbox.receiver = #{currentClientId}
AND im_inbox.receiver = #{currentClientId}
AND im_inbox.read_msg_status = 0
AND im_inbox.read_msg_status = 0
AND (FIND_IN_SET(#{c
urrentC
lientId},im_message.`at`) > 0 or FIND_IN_SET('-1',im_message.`at`) > 0)) AS beAtCount,
AND (FIND_IN_SET(#{clientId},im_message.`at`) > 0 or FIND_IN_SET('-1',im_message.`at`) > 0)) AS beAtCount,
(
(
SELECT GROUP_CONCAT(im_client.client_id)
SELECT GROUP_CONCAT(im_client.client_id)
FROM im_conversation_members AS im_conversation_members
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