From a508dd2c0fccd31afa08f7f72f1ef51416a3e43b Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 6 Sep 2022 17:51:29 +0800 Subject: [PATCH] fix bug --- pkg/common/db/mysql_model/im_mysql_model/message_cms.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/message_cms.go b/pkg/common/db/mysql_model/im_mysql_model/message_cms.go index eb37aae80..615b09d7a 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/message_cms.go +++ b/pkg/common/db/mysql_model/im_mysql_model/message_cms.go @@ -21,7 +21,7 @@ func GetChatLog(chatLog db.ChatLog, pageNumber, showNumber int32) ([]db.ChatLog, if chatLog.SessionType == 1 { db = db.Where("session_type = ?", chatLog.SessionType) } else if chatLog.SessionType == 2 { - db = db.Where("content_type in (?)", []int{constant.GroupChatType, constant.SuperGroupChatType}) + db = db.Where("session_type in (?)", []int{constant.GroupChatType, constant.SuperGroupChatType}) } if chatLog.ContentType != 0 { db = db.Where("content_type = ?", chatLog.ContentType) @@ -50,7 +50,7 @@ func GetChatLogCount(chatLog db.ChatLog) (int64, error) { if chatLog.SessionType == 1 { db = db.Where("session_type = ?", chatLog.SessionType) } else if chatLog.SessionType == 2 { - db = db.Where("content_type in (?)", []int{constant.GroupChatType, constant.SuperGroupChatType}) + db = db.Where("session_type in (?)", []int{constant.GroupChatType, constant.SuperGroupChatType}) } if chatLog.ContentType != 0 { db = db.Where("content_type = ?", chatLog.ContentType)