batch to mongo

This commit is contained in:
skiffer-git
2022-05-20 11:20:21 +08:00
committed by Xinwei Xiong(cubxxw-openim)
parent ae7e681bca
commit 7b2de29e30
3 changed files with 11 additions and 4 deletions
+7
View File
@@ -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