任务:镇念塔无法碾压达成

This commit is contained in:
luying
2022-05-07 21:12:46 +08:00
parent f84f41fe00
commit d1115fb5d0
3 changed files with 6 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ export default class UserTaskRec extends BaseModel {
public static async recordTaskRec(roleId: string, type: number, taskType: number, group: string, records?: string[]) {
let condition = this.getRefreshCondition(type);
let rec: UserTaskRecType = await UserTaskRecModel.findOneAndUpdate({ roleId, group, taskType, ...condition }, { $setOnInsert: { code: genCode(8), received: [] }, $set: { records: records||[] } }, { new: true, upsert: true }).lean();
let rec: UserTaskRecType = await UserTaskRecModel.findOneAndUpdate({ roleId, group, taskType, ...condition }, { $setOnInsert: { code: genCode(8), received: [], count: 0 }, $set: { records: records||[] } }, { new: true, upsert: true }).lean();
return rec;
}