军团:fix拒绝邀请未删除条目,升级建筑去锁

This commit is contained in:
luying
2021-02-23 11:47:47 +08:00
parent 6759a7dcb1
commit 53b873941e
4 changed files with 14 additions and 29 deletions

View File

@@ -46,8 +46,8 @@ export default class UserGuildApply extends BaseModel {
}
// 根据唯一code批量删除
public static async deleteApplyByApplyCode(applyCodeList: string[]) {
const result = await UserGuildApplyModel.deleteMany({ applyCode: { $in: applyCodeList}, type: GUILD_APPLY_TYPE.APPLY });
public static async deleteByApplyCode(applyCodeList: string[]) {
const result = await UserGuildApplyModel.deleteMany({ applyCode: { $in: applyCodeList} });
return result;
}
@@ -70,7 +70,7 @@ export default class UserGuildApply extends BaseModel {
}
// 查询公会收到的申请
public static async getListByGuild(code: string, lastApplyCode: string) {
public static async findApplyByGuild(code: string, lastApplyCode: string) {
let condition = { guildCode: code, type: GUILD_APPLY_TYPE.APPLY };
if(lastApplyCode) {
const lastApply = await this.findByCode(lastApplyCode);
@@ -85,7 +85,7 @@ export default class UserGuildApply extends BaseModel {
}
// 查询玩家的邀请列表
public static async getListByRole(roleId: string, lastApplyCode: string) {
public static async findInviteByRole(roleId: string, lastApplyCode: string) {
let condition = { roleId, type: GUILD_APPLY_TYPE.INVITE };
if(lastApplyCode) {
const lastApply = await this.findByCode(lastApplyCode);