任务:其他活动任务更新records

This commit is contained in:
luying
2022-04-28 20:38:44 +08:00
parent 7ccabe714f
commit e6b2a30392
4 changed files with 16 additions and 0 deletions

View File

@@ -34,6 +34,10 @@ export default class Activity_Treasure_Hunt_Task extends ActivityGrowth {
return await this.setTaskCount(serverId, activityId, roleId, roundIndex, cellIndex, taskType, param.set, param.records);
} else if (param.inc) {
return await this.addTaskCount(serverId, activityId, roleId, roundIndex, cellIndex, taskType, param.inc, param.records);
} else if (param.records){
let result: ActivityTreasureHuntTaskModelType = await ActivityTreasureHuntTaskModel.findOneAndUpdate({ serverId, roleId, activityId, roundIndex, cellIndex },
{ $set: { records: param.records, taskType } }, { upsert: true, new: true }).lean();
return result;
}
}