✨ feat(gvg): 备战期结束发放未领取邮件

This commit is contained in:
luying
2023-03-07 19:23:37 +08:00
parent 6b79612a5e
commit 129f232e84
8 changed files with 88 additions and 7 deletions
+5
View File
@@ -77,6 +77,11 @@ export default class GVGVestigeSumRank extends BaseModel {
public static async receiveRanks(_ids: string[]) {
await GVGVestigeSumRankModel.updateMany({ _id: { $in: _ids } }, { $set: { isReceived: true } });
}
public static async getAllCanReceiveRanks(configId: number) {
let result: GVGVestigeSumRankType[] = await GVGVestigeSumRankModel.find({ configId: { $lte: configId }, rank: { $gt: 0 }, isReceived: false }).lean();
return result;
}
}
export const GVGVestigeSumRankModel = getModelForClass(GVGVestigeSumRank);