pull/455/head
wenxu12345 3 years ago committed by Xinwei Xiong(cubxxw-openim)
parent daa716a083
commit 7e38335f0c

@ -22,8 +22,8 @@ func saveUserChat(uid string, msg *pbMsg.MsgDataToMQ) error {
// return db.DB.SaveUserChatMongo2(uid, pbSaveData.MsgData.SendTime, &pbSaveData)
}
func saveUserChatList(userID string, msgList []*pbMsg.MsgDataToMQ, operationID string) error {
func saveUserChatList(userID string, msgList []*pbMsg.MsgDataToMQ, operationID string) (error, uint64) {
log.Info(operationID, utils.GetSelfFuncName(), "args ", userID, len(msgList))
//return db.DB.BatchInsertChat(userID, msgList, operationID)
return db.DB.BatchInsertChatBoth(userID, msgList, operationID)
return db.DB.BatchInsertChat2Cache(userID, msgList, operationID)
}

@ -799,6 +799,10 @@ func getSeqUid(uid string, seq uint32) string {
return indexGen(uid, seqSuffix)
}
func GetSeqUid(uid string, seq uint32) string {
return getSeqUid(uid, seq)
}
func getMsgIndex(seq uint32) int {
seqSuffix := seq / singleGocMsgNum
var index uint32

Loading…
Cancel
Save