活动:添加活动组
This commit is contained in:
@@ -18,7 +18,7 @@ export default class Activity_Growth_Point extends BaseModel {
|
||||
|
||||
//当日奖章领取记录
|
||||
public static async addRecord(serverId: number, activityId: number, roleId: string, id: number) {
|
||||
let result: ActivityGrowthPointModelType = await ActivityGrowthPointModel.findOneAndUpdate({ serverId, roleId, activityId, id },
|
||||
let result: ActivityGrowthPointModelType = await ActivityGrowthPointModel.findOneAndUpdate({ serverId, roleId, activityId },
|
||||
{ $push: { ids: id } }, { upsert: true, new: true }).lean(true);
|
||||
return result;
|
||||
}
|
||||
@@ -30,8 +30,8 @@ export default class Activity_Growth_Point extends BaseModel {
|
||||
}
|
||||
|
||||
//删除活动领取记录
|
||||
public static async deleteActivity(serverId: number, activityId: number, roleId: string, id: number) {
|
||||
await ActivityGrowthPointModel.deleteMany({ serverId, roleId, activityId, id });
|
||||
public static async deleteActivity(serverId: number, activityId: number, roleId: string) {
|
||||
await ActivityGrowthPointModel.deleteMany({ serverId, roleId, activityId });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user