mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-02 16:15:59 +08:00
batch to mongo
This commit is contained in:
@@ -68,6 +68,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