七天乐:升星任务

This commit is contained in:
luying
2022-04-28 18:22:39 +08:00
parent ee86f7f7ce
commit ada0f99a61
5 changed files with 21 additions and 13 deletions

View File

@@ -42,6 +42,10 @@ export default class Activity_Daily_Challenges extends BaseModel {
return await this.setTaskCount(serverId, activityId, roleId, dayIndex, cellIndex, taskType, param.set, param.records);
} else if (param.inc) {
return await this.addTaskCount(serverId, activityId, roleId, dayIndex, cellIndex, taskType, param.inc, param.records);
} else if (param.records){
let result: ActivityDailyChallengesModelType = await ActivityDailyChallengesModel.findOneAndUpdate({ serverId, roleId, activityId, dayIndex, cellIndex },
{ $set: { records: param.records, taskType } }, { upsert: true, new: true }).lean();
return result;
}
}