活动:寻宝骑兵添加首页奖励内容

This commit is contained in:
qiaoxin
2021-06-03 15:55:40 +08:00
parent b628f0704a
commit fff8ef153d
7 changed files with 176 additions and 139 deletions

View File

@@ -19,47 +19,12 @@ export default class Activity_Treasure_Hunt_Task extends ActivityGrowth {
return result;
}
// //根据活动统计完成任务次数
// public static async setTaskCount(serverId: number, activityId: number, roleId: string, roundIndex: number, cellIndex: number, type: number, count: number, lean = true) {
// let result: ActivityTreasureHuntTaskModelType = await ActivityTreasureHuntTaskModel.findOneAndUpdate({ serverId, roleId, activityId, roundIndex, cellIndex, type },
// { $set: { totalCount: count } }, { upsert: true, new: true }).lean(lean);
// return result;
// }
// //根据活动统计完成任务次数
// public static async addTaskCount(serverId: number, activityId: number, roleId: string, roundIndex: number, cellIndex: number, type: number, addCount: number, lean = true) {
// let result: ActivityTreasureHuntTaskModelType = await ActivityTreasureHuntTaskModel.findOneAndUpdate({ serverId, roleId, activityId, roundIndex, cellIndex, type },
// { $inc: { totalCount: addCount } }, { upsert: true, new: true }).lean(lean);
// return result;
// }
// //根据活动记录统计数据
// public static async addTaskRecord(serverId: number, activityId: number, roleId: string, roundIndex: number, cellIndex: number, type: number, data: string,) {
// let result: ActivityTreasureHuntTaskModelType = await ActivityTreasureHuntTaskModel.findOneAndUpdate({ serverId, roleId, activityId, roundIndex, cellIndex, type },
// { $set: { data: data } }, { upsert: true, new: true }).lean(true);
// return result;
// }
// //根据活动id查询活动数据
// public static async findTaskData(serverId: number, activityId: number, roleId: string, roundIndex: number) {
// let result: ActivityTreasureHuntTaskModelType[] = await ActivityTreasureHuntTaskModel.find({ serverId, roleId, activityId }).lean(true);
// return result;
// }
//查询第几天的活动数据
public static async findDataByRoundIndex(serverId: number, activityId: number, roleId: string, roundIndex: number) {
let result: ActivityTreasureHuntTaskModelType[] = await ActivityTreasureHuntTaskModel.find({ serverId, roleId, activityId, roundIndex }).lean(true);
return result;
}
//查询第几天某个的活动数据
// public static async findDataByCellIndex(serverId: number, activityId: number, roleId: string, roundIndex: number, cellIndex: number, type: number,) {
// let result: ActivityTreasureHuntTaskModelType = await ActivityTreasureHuntTaskModel.findOne({ serverId, roleId, activityId, roundIndex, cellIndex, type }).lean(true);
// return result;
// }
//删除活动领取记录
public static async deleteActivity(serverId: number, activityId: number, roleId: string, roundIndex: number, cellIndex: number) {
await ActivityTreasureHuntTaskModel.deleteMany({ serverId, roleId, activityId, roundIndex, cellIndex });