后台:添加武将,装备,道具

This commit is contained in:
luying
2021-01-28 12:01:26 +08:00
parent 72a089b179
commit b880962f02
12 changed files with 428 additions and 58 deletions
+5
View File
@@ -234,6 +234,11 @@ export default class PvpDefense extends BaseModel {
.sort(sortBy).limit(limit).skip((page - 1) * limit).lean(lean);
return ranks;
}
public static async deleteHero(roleId: string, hid: number) {
let result:PvpDefenseType = await PvpDefenseModel.findOneAndUpdate({roleId}, {$pull:{heroes: {actorId:hid}}}, {new: true}).lean();
return result;
}
}
export const PvpDefenseModel = getModelForClass(PvpDefense);