Commit 494cb7e1 by Future

群@功能

parent 7417dc4a
...@@ -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);
......
...@@ -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);
/** /**
* 查询用户加入的所有会话 * 查询用户加入的所有会话
......
...@@ -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;
} }
......
...@@ -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(#{currentClientId},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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment