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)