任务:其他活动任务更新records
This commit is contained in:
@@ -41,6 +41,10 @@ export default class Activity_Growth 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: ActivityGrowthModelType = await ActivityGrowthModel.findOneAndUpdate({ serverId, roleId, activityId, dayIndex, cellIndex },
|
||||
{ $set: { records: param.records, taskType } }, { upsert: true, new: true }).lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,10 @@ export default class Activity_Refresh_Task extends BaseModel {
|
||||
return await this.setTaskCount(serverId, activityId, roleId, roundIndex, pageIndex, id, taskType, param.set, param.records);
|
||||
} else if (param.inc) {
|
||||
return await this.addTaskCount(serverId, activityId, roleId, roundIndex, pageIndex, id, taskType, param.inc, param.records);
|
||||
} else if (param.records){
|
||||
let result: ActivityRefreshTaskModelType = await ActivityRefreshTaskModel.findOneAndUpdate({ serverId, roleId, activityId, roundIndex, pageIndex, id },
|
||||
{ $set: { records: param.records, taskType } }, { upsert: true, new: true }).lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@ export default class Activity_Thirty_Days extends BaseModel {
|
||||
return await this.setTaskCount(serverId, activityId, roleId, pageIndex, cellIndex, tab, taskType, param.set, param.records);
|
||||
} else if (param.inc) {
|
||||
return await this.addTaskCount(serverId, activityId, roleId, pageIndex, cellIndex, tab, taskType, param.inc, param.records);
|
||||
} else if (param.records){
|
||||
let result: ActivityThirtyDaysModelType = await ActivityThirtyDaysModel.findOneAndUpdate({ serverId, roleId, activityId, pageIndex, cellIndex, tab },
|
||||
{ $set: { records: param.records, taskType } }, { upsert: true, new: true }).lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user