This commit is contained in:
skiffer-git 2022-05-20 19:36:06 +08:00 committed by Xinwei Xiong(cubxxw-openim)
parent 1fda2e5135
commit d5167688b1

View File

@ -31,8 +31,9 @@ func (d *DataBases) BatchInsertChat(userID string, msgList []*pbMsg.MsgDataToMQ,
var remain uint64
if currentMaxSeq < uint64(GetSingleGocMsgNum()) {
remain = uint64(GetSingleGocMsgNum()-1) - (currentMaxSeq % uint64(GetSingleGocMsgNum()))
} else {
remain = uint64(GetSingleGocMsgNum()) - (currentMaxSeq % uint64(GetSingleGocMsgNum()))
}
remain = uint64(GetSingleGocMsgNum()) - (currentMaxSeq % uint64(GetSingleGocMsgNum()))
insertCounter := uint64(0)
msgListToMongo := make([]MsgInfo, 0)
msgListToMongoNext := make([]MsgInfo, 0)