✨ feat(离线icon): 到8110dd75c
This commit is contained in:
@@ -127,6 +127,23 @@ export default class GVGVestigeRec extends BaseModel {
|
||||
}).select({ battleCode: 1, attackRoleId: 1, defenseRoleId: 1, _id: 0, endTime: 1, attackInfo: 1, defenseInfo: 1, hasRpl: 1, remoteUrl: 1 }).limit(1000).lean();
|
||||
return recs;
|
||||
}
|
||||
|
||||
public static async findRecCurDay(roleId: string, startMs:number) {
|
||||
const pipeline = [
|
||||
{ $match: {endTime: { $gt: startMs }, $or: [{ attackRoleId: roleId }, { defenseRoleId: roleId }]} },
|
||||
{ $sort: { endTime: -1 } },
|
||||
// { $limit: 1000 },
|
||||
];
|
||||
let result:GVGVestigeRecType[] = []
|
||||
const recs: GVGVestigeRecType[] = await GVGVestigeRecModel.aggregate(pipeline);
|
||||
if (recs.length > 0) {
|
||||
for(const obj of recs){
|
||||
if(obj.defenseRoleId == roleId && (!obj.defenseInfo.isSuccess)) result.push(obj);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
export const GVGVestigeRecModel = getModelForClass(GVGVestigeRec);
|
||||
|
||||
Reference in New Issue
Block a user