mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 09:36:00 +08:00
batch to mongo
This commit is contained in:
committed by
Xinwei Xiong(cubxxw-openim)
parent
ae7e681bca
commit
7b2de29e30
@@ -62,6 +62,13 @@ func (d *DataBases) GetUserMaxSeq(uid string) (uint64, error) {
|
||||
return redis.Uint64(d.Exec("GET", key))
|
||||
}
|
||||
|
||||
//set the largest Seq
|
||||
func (d *DataBases) SetUserMaxSeq(uid string, maxSeq uint32) error {
|
||||
key := userIncrSeq + uid
|
||||
_, err := redis.Uint64(d.Exec("SET", key, maxSeq))
|
||||
return err
|
||||
}
|
||||
|
||||
//Set the user's minimum seq
|
||||
func (d *DataBases) SetUserMinSeq(uid string, minSeq uint32) (err error) {
|
||||
key := userMinSeq + uid
|
||||
|
||||
Reference in New Issue
Block a user