后台:修改更新活动
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, ReturnModelType, mongoose } from '@typegoose/typegoose';
|
||||
import { CounterModel } from './Counter';
|
||||
import { CounterAllModal } from './CounterAll';
|
||||
import { COUNTER } from '../consts';
|
||||
import { ActivityModel } from './Activity';
|
||||
|
||||
@@ -28,7 +28,7 @@ export default class Activity_Group extends BaseModel {
|
||||
|
||||
//查询组
|
||||
public static async createGroup(uid = 1) {
|
||||
let groupId = await CounterModel.getNewCounter(COUNTER.ACTIVITY_GROUP);
|
||||
let groupId = await CounterAllModal.getNewCounter(COUNTER.ACTIVITY_GROUP);
|
||||
|
||||
let result: ActivityGroupModelType = await ActivityGroupModel.findOneAndUpdate({ groupId }, {
|
||||
$setOnInsert: { groupName: `活动组${groupId}`, activities: [], serverIds: [], createdBy: uid, type: 0 }, $set: { updatedBy: uid }
|
||||
|
||||
Reference in New Issue
Block a user