🐞 fix(订单): 各种类型的订单在支付之前校验次数
This commit is contained in:
@@ -73,6 +73,16 @@ export default class Activity_Daily_RMB_Gifts extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// 检查是否购买过
|
||||
public static async checkHasBought(serverId: number, activityId: number, roleId: string, beginTime: Date, todayIndex: number) {
|
||||
return await ActivityDailyRMBGiftsModel.exists({ serverId, roleId, activityId, beginTime, todayIndex });
|
||||
}
|
||||
|
||||
public static async checkHasReceive(serverId: number, activityId: number, roleId: string, beginTime: Date, todayIndex: number, id: number) {
|
||||
return await ActivityDailyRMBGiftsModel.exists({ serverId, roleId, activityId, beginTime, todayIndex, 'records.id': id });
|
||||
}
|
||||
|
||||
//删除活动领取记录
|
||||
public static async deleteActivity(serverId: number, activityId: number, roleId: string) {
|
||||
await ActivityDailyRMBGiftsModel.deleteMany({ serverId, roleId, activityId });
|
||||
|
||||
Reference in New Issue
Block a user