mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-04 09:09:02 +08:00
errcode
This commit is contained in:
parent
1235715c22
commit
135c2c36aa
@ -34,9 +34,7 @@ func ResetUserGroupMinSeq(operationID, groupID string, userIDList []string) erro
|
|||||||
log.NewError(operationID, utils.GetSelfFuncName(), "GetGroupUserMinSeq failed", groupID, userID, err.Error())
|
log.NewError(operationID, utils.GetSelfFuncName(), "GetGroupUserMinSeq failed", groupID, userID, err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if userMinSeq > uint64(minSeq) {
|
if userMinSeq < uint64(minSeq) {
|
||||||
err = db.DB.SetGroupUserMinSeq(groupID, userID, userMinSeq)
|
|
||||||
} else {
|
|
||||||
err = db.DB.SetGroupUserMinSeq(groupID, userID, uint64(minSeq))
|
err = db.DB.SetGroupUserMinSeq(groupID, userID, uint64(minSeq))
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -56,6 +54,19 @@ func DeleteMongoMsgAndResetRedisSeq(operationID, userID string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDStruct: ", delStruct, "minSeq", minSeq)
|
log.NewDebug(operationID, utils.GetSelfFuncName(), "delMsgIDStruct: ", delStruct, "minSeq", minSeq)
|
||||||
|
|
||||||
|
userCurrentMinSeq, err := db.DB.GetUserMinSeq(userID)
|
||||||
|
if err != nil && err != goRedis.Nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
userCurrentMaxSeq, err := db.DB.GetUserMaxSeq(userID)
|
||||||
|
if err != nil && err != goRedis.Nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if userCurrentMinSeq > userCurrentMaxSeq {
|
||||||
|
minSeq = uint32(userCurrentMaxSeq)
|
||||||
|
}
|
||||||
|
|
||||||
err = db.DB.SetUserMinSeq(userID, minSeq)
|
err = db.DB.SetUserMinSeq(userID, minSeq)
|
||||||
return utils.Wrap(err, "")
|
return utils.Wrap(err, "")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user