This commit is contained in:
wangchuxiao 2023-05-23 10:49:30 +08:00
parent 219d57528b
commit 5983f429eb

View File

@ -21,6 +21,9 @@ import (
func GenMsgDoc(startSeq, stopSeq, delSeq, index int64, conversationID string) *unRelationTb.MsgDocModel { func GenMsgDoc(startSeq, stopSeq, delSeq, index int64, conversationID string) *unRelationTb.MsgDocModel {
msgDoc := &unRelationTb.MsgDocModel{DocID: conversationID + strconv.Itoa(int(index))} msgDoc := &unRelationTb.MsgDocModel{DocID: conversationID + strconv.Itoa(int(index))}
for i := 0; i < 5000; i++ {
msgDoc.Msg = append(msgDoc.Msg, unRelationTb.MsgInfoModel{SendTime: 0, Msg: []byte{}})
}
for i := startSeq; i <= stopSeq; i++ { for i := startSeq; i <= stopSeq; i++ {
msg := sdkws.MsgData{ msg := sdkws.MsgData{
SendID: "sendID1", SendID: "sendID1",
@ -47,7 +50,7 @@ func GenMsgDoc(startSeq, stopSeq, delSeq, index int64, conversationID string) *u
} else { } else {
sendTime = utils.GetCurrentTimestampByMill() sendTime = utils.GetCurrentTimestampByMill()
} }
msgDoc.Msg = append(msgDoc.Msg, unRelationTb.MsgInfoModel{SendTime: int64(sendTime), Msg: bytes}) msgDoc.Msg[i-1] = unRelationTb.MsgInfoModel{SendTime: int64(sendTime), Msg: bytes}
} }
return msgDoc return msgDoc
} }