军团:添加锁
This commit is contained in:
@@ -124,6 +124,10 @@ export enum GUILD_DATA_NAME {
|
||||
GUILD = 'Guild',
|
||||
GUILD_REFINE = 'GuildRefine',
|
||||
GUILD_ASSIST_REFINE = 'GuildAssistRefine',
|
||||
UP_STRUCTURE = 'GuildStructure',
|
||||
JOIN_GUILD = 'JoinGuild',
|
||||
REFRESH_ACTIVE = 'GuildRefActive',
|
||||
WEEKLY_GUILD_SUM = 'WeeklyGuildSum', // 每周结算活跃和奖励
|
||||
}
|
||||
|
||||
export const GUILD_REPORT_NUM = 40;
|
||||
|
||||
@@ -147,6 +147,7 @@ export const STATUS = {
|
||||
GUILD_ACTIVE_BOX_NOT_FOUND: { code: 20918, simStr: '未找到该活跃宝箱' },
|
||||
GUILD_ACTIVE_POINT_NOT_REACH: { code: 20919, simStr: '军团活跃值不足' },
|
||||
GUILD_ACTIVE_BOX_HAS_RECEIVED: { code: 20920, simStr: '该活跃宝箱已领取' },
|
||||
GUILD_WEEKLY_SUM: { code: 20921, simStr: '正在周结算中' },
|
||||
|
||||
// 通用 30000 - 30099
|
||||
DIC_DATA_NOT_FOUND: { code: 30000, simStr: '数据表未找到' },
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
|
||||
import { genCode } from '../pubUtils/util'
|
||||
|
||||
/**
|
||||
* 自增 ID
|
||||
*/
|
||||
@index({ name: 1 })
|
||||
export default class ErrLog extends BaseModel {
|
||||
|
||||
@prop({ required: true })
|
||||
code: string;
|
||||
|
||||
@prop({ required: true, default: "" })
|
||||
desc: string;
|
||||
|
||||
public static async create(desc: string) {
|
||||
let code = genCode(12);
|
||||
await ErrLogModel.insertMany({ code, desc });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const ErrLogModel = getModelForClass(ErrLog);
|
||||
|
||||
export interface ErrLogType extends Pick<DocumentType<ErrLog>, keyof ErrLog>{};
|
||||
Reference in New Issue
Block a user