mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-01 21:05:15 +08:00
seqs
This commit is contained in:
parent
482ea572c4
commit
2c58335b9b
@ -101,7 +101,7 @@ func (m MsgDocModel) GetSeqsBeginEnd(seqs []int64) (int64, int64) {
|
|||||||
if len(seqs) == 0 {
|
if len(seqs) == 0 {
|
||||||
return 0, 0
|
return 0, 0
|
||||||
}
|
}
|
||||||
return seqs[0], seqs[len(seqs)-1]
|
return seqs[len(seqs)-1], seqs[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m MsgDocModel) GetMsgIndex(seq int64) int64 {
|
func (m MsgDocModel) GetMsgIndex(seq int64) int64 {
|
||||||
|
@ -137,7 +137,6 @@ func (m *MsgMongoDriver) UpdateOneDoc(ctx context.Context, msg *table.MsgDocMode
|
|||||||
func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID string, beginSeq, endSeq int64) (msgs []*sdkws.MsgData, seqs []int64, err error) {
|
func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID string, beginSeq, endSeq int64) (msgs []*sdkws.MsgData, seqs []int64, err error) {
|
||||||
beginIndex := m.msg.GetMsgIndex(beginSeq)
|
beginIndex := m.msg.GetMsgIndex(beginSeq)
|
||||||
num := endSeq - beginSeq + 1
|
num := endSeq - beginSeq + 1
|
||||||
|
|
||||||
pipeline := bson.A{
|
pipeline := bson.A{
|
||||||
bson.M{
|
bson.M{
|
||||||
"$match": bson.M{"doc_id": docID},
|
"$match": bson.M{"doc_id": docID},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user