活动:目标点数兑换奖励过期判断
This commit is contained in:
@@ -15,7 +15,24 @@ export default class ActivityThirtyDaysPointReward extends BaseModel {
|
||||
cellIndex: number; // 第几个奖励
|
||||
@prop({ required: true })
|
||||
isReceive: boolean; // 是否领取过奖励
|
||||
@prop({ required: true })
|
||||
isExpired: boolean; // 是否过期奖励
|
||||
|
||||
//添加过期记录
|
||||
public static async setExpired(acvitityId: number, roleId: string, cells: Array<number>) {
|
||||
let records = [];
|
||||
for (let cellIndex of cells) {
|
||||
let data = {
|
||||
acvitityId,
|
||||
roleId,
|
||||
cellIndex,
|
||||
isReceive: false,
|
||||
isExpired: true,
|
||||
}
|
||||
records.push(data)
|
||||
}
|
||||
await ActivityThirtyDaysPointRewardModel.insertMany(records);
|
||||
}
|
||||
|
||||
//添加领取记录
|
||||
public static async addRecord(acvitityId: number, roleId: string, cellIndex: number, lean = true) {
|
||||
|
||||
Reference in New Issue
Block a user