🐞 fix(后台): 修复后台活动积分&大区配置bug
This commit is contained in:
@@ -25,9 +25,9 @@ export default class Activity_Task_Point extends BaseModel {
|
||||
point: number; // 增加点数
|
||||
|
||||
//更新活动数据
|
||||
public static async updateData(type: number, taskId: number, activityId: number, point: number, uid = 1) {
|
||||
public static async updateData(type: number, taskId: number, activityId: number, activityType: number, taskType: number, point: number, uid = 1) {
|
||||
let result: ActivityTaskPointModelType = await ActivityTaskPointModel.findOneAndUpdate(
|
||||
{ type, taskId, activityId }, { $set: { point, updatedBy: uid }, $setOnInsert: { createdBy: uid } }, { upsert: true, new: true }
|
||||
{ type, taskId, activityId }, { $set: { activityType, taskType, point, updatedBy: uid }, $setOnInsert: { createdBy: uid } }, { upsert: true, new: true }
|
||||
).lean(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -80,8 +80,16 @@ export default class ServerStategy {
|
||||
this.timers = stategy.timers;
|
||||
this.activityGroupId = stategy.activityGroupId;
|
||||
this.stopRegisterTime = stategy.stopRegisterTime;
|
||||
if(stategy.hasCircleMail) this.circleMail = stategy.circleMail;
|
||||
if(stategy.hasOpenMail) this.openMail = stategy.openMail;
|
||||
if(stategy.hasCircleMail) {
|
||||
this.circleMail = stategy.circleMail;
|
||||
} else {
|
||||
this.circleMail = null;
|
||||
}
|
||||
if(stategy.hasOpenMail) {
|
||||
this.openMail = stategy.openMail;
|
||||
} else {
|
||||
this.openMail = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
export interface ServerStategyType extends Pick<DocumentType<ServerStategy>, keyof ServerStategy> { };
|
||||
|
||||
Reference in New Issue
Block a user