后台:权限
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { COUNTER } from './../consts';
|
||||
import { CounterModel } from './Counter';
|
||||
import { CounterAllModal } from './CounterAll';
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, mongoose, ReturnModelType } from '@typegoose/typegoose';
|
||||
import ServerStategy from './ServerStategy';
|
||||
@@ -49,7 +49,7 @@ export default class Region extends BaseModel {
|
||||
stategy: ServerStategy; // 策略配置
|
||||
|
||||
public static async createNewRegion(params: RegionUpdate, uid = 1) {
|
||||
let id = await CounterModel.getNewCounter(COUNTER.REGION);
|
||||
let id = await CounterAllModal.getNewCounter(COUNTER.REGION);
|
||||
|
||||
const rec: RegionType = await RegionModel.findOneAndUpdate({ id }, { $setOnInsert: { ...params, createdBy: uid}, $set: { updatedBy: uid } }, { new: true, upsert: true }).lean();
|
||||
return rec;
|
||||
|
||||
Reference in New Issue
Block a user