feat(聊天): 战区频道

This commit is contained in:
luying
2023-03-18 18:05:09 +08:00
parent e52c7b5241
commit 2d8abaaaff
5 changed files with 47 additions and 25 deletions

View File

@@ -55,8 +55,8 @@ export default class GroupMessage extends BaseModel {
return result;
}
public static async getMsgs(roomId: string, fromSeqId: number, count: number) {
const result = await GroupMessageModel.find({ roomId, seqId: { $lt: fromSeqId } }).sort({ seqId: -1 }).limit(count).lean();
public static async getMsgs(roomIds: string[], fromSeqId: number, count: number) {
const result = await GroupMessageModel.find({ roomId: { $in: roomIds }, seqId: { $lt: fromSeqId } }).sort({ seqId: -1 }).limit(count).lean();
return result;
}
}