This commit is contained in:
Gordon
2022-07-29 13:05:51 +08:00
parent 51679b47a6
commit 6d15e5b5a1
3 changed files with 1412 additions and 2 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ func (rpc *rpcChat) SetMsgMinSeq(_ context.Context, req *pbChat.SetMsgMinSeqReq)
} }
return &pbChat.SetMsgMinSeqResp{}, nil return &pbChat.SetMsgMinSeqResp{}, nil
} }
err := db.DB.SetGroupUserMinSeq(req.GroupID, req.UserID, req.MinSeq) err := db.DB.SetGroupUserMinSeq(req.GroupID, req.UserID, uint64(req.MinSeq))
if err != nil { if err != nil {
errMsg := "SetGroupUserMinSeq failed " + err.Error() + req.OperationID + req.GroupID + req.UserID + utils.Uint32ToString(req.MinSeq) errMsg := "SetGroupUserMinSeq failed " + err.Error() + req.OperationID + req.GroupID + req.UserID + utils.Uint32ToString(req.MinSeq)
log.Error(req.OperationID, errMsg) log.Error(req.OperationID, errMsg)
+1 -1
View File
@@ -88,7 +88,7 @@ func (d *DataBases) GetUserMinSeq(uid string) (uint64, error) {
return uint64(utils.StringToInt(seq)), err return uint64(utils.StringToInt(seq)), err
} }
func (d *DataBases) SetGroupUserMinSeq(groupID, userID string, minSeq uint32) (err error) { func (d *DataBases) SetGroupUserMinSeq(groupID, userID string, minSeq uint64) (err error) {
key := groupUserMinSeq + "g:" + groupID + "u:" + userID key := groupUserMinSeq + "g:" + groupID + "u:" + userID
return d.RDB.Set(context.Background(), key, minSeq, 0).Err() return d.RDB.Set(context.Background(), key, minSeq, 0).Err()
} }
File diff suppressed because it is too large Load Diff