军团:添加管理debug接口
This commit is contained in:
@@ -145,7 +145,7 @@ export default class Guild extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async updateInfo(code: string, update: GuildUpdateParam, incParam?: { managerCnt?: number, fund?: number }, select?: string) {
|
||||
public static async updateInfo(code: string, update: GuildUpdateParam, incParam?: { managerCnt?: number, fund?: number, activeDaily?: number, activeWeekly?: number }, select?: string) {
|
||||
const result: GuildType = await GuildModel.findOneAndUpdate({ code }, { $set: update, $inc: incParam }, { new: true }).select(select).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ export default class UserGuild extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async updateInfo(roleId: string, update: UserGuildUpdateParam, select?: string) {
|
||||
const result = await UserGuildModel.findOneAndUpdate({ roleId, status: USER_GUILD_STATUS.ON }, { $set: update }, { new: true }).select(select).lean();
|
||||
public static async updateInfo(roleId: string, update: UserGuildUpdateParam, incParam?: { activeDaily?: number, activeWeekly?: number, trainCount?: number }, select?: string) {
|
||||
const result = await UserGuildModel.findOneAndUpdate({ roleId, status: USER_GUILD_STATUS.ON }, { $set: update, $inc: incParam }, { new: true }).select(select).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user