diff --git a/src/main/java/com/sqx/modules/chat/service/impl/ChatConversationServiceImpl.java b/src/main/java/com/sqx/modules/chat/service/impl/ChatConversationServiceImpl.java index 9a13c22..031d771 100644 --- a/src/main/java/com/sqx/modules/chat/service/impl/ChatConversationServiceImpl.java +++ b/src/main/java/com/sqx/modules/chat/service/impl/ChatConversationServiceImpl.java @@ -43,7 +43,7 @@ public class ChatConversationServiceImpl extends ServiceImpl().eq("focused_user_id", userId).eq("user_id", focusedUserId)); + return baseMapper.selectOne(new QueryWrapper().eq("focused_user_id", focusedUserId).eq("user_id", userId)); } diff --git a/src/main/resources/mapper/chat/ChatConversationDao.xml b/src/main/resources/mapper/chat/ChatConversationDao.xml index 5420e7c..5da88b8 100644 --- a/src/main/resources/mapper/chat/ChatConversationDao.xml +++ b/src/main/resources/mapper/chat/ChatConversationDao.xml @@ -31,7 +31,7 @@ user_id, - + focused_user_id, @@ -51,7 +51,7 @@ #{userId}, - + #{focusedUserId},