mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix bug
This commit is contained in:
parent
099461dbbf
commit
5469bb6508
@ -47,14 +47,14 @@ func GetChatLogCount(chatLog db.ChatLog) (int64, error) {
|
||||
if chatLog.Content != "" {
|
||||
db = db.Where(" content like ? ", fmt.Sprintf("%%%s%%", chatLog.Content))
|
||||
}
|
||||
if chatLog.SessionType != 0 {
|
||||
if chatLog.SessionType == 1 {
|
||||
db = db.Where("session_type = ?", chatLog.SessionType)
|
||||
}
|
||||
if chatLog.ContentType == 1 {
|
||||
db = db.Where("content_type = ?", chatLog.ContentType)
|
||||
} else if chatLog.ContentType == 2 {
|
||||
} else if chatLog.SessionType == 2 {
|
||||
db = db.Where("content_type in (?)", []int{constant.GroupChatType, constant.SuperGroupChatType})
|
||||
}
|
||||
if chatLog.ContentType != 0 {
|
||||
db = db.Where("content_type = ?", chatLog.ContentType)
|
||||
}
|
||||
if chatLog.SendID != "" {
|
||||
db = db.Where("send_id = ?", chatLog.SendID)
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ func GetActiveUsers(from, to time.Time, limit int) ([]*activeUser, error) {
|
||||
continue
|
||||
}
|
||||
activeUser.Name = user.Nickname
|
||||
activeUser.ID = user.UserID
|
||||
}
|
||||
return activeUsers, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user