军团:添加踢人解散退出,添加权限
This commit is contained in:
@@ -40,6 +40,11 @@ export default class UserGuildApply extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async deleteApplyByGuild(guildCode: string) {
|
||||
const result = await UserGuildApplyModel.deleteMany({ guildCode, type: GUILD_APPLY_TYPE.APPLY });
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async deleteApplyByApplyCode(applyCodeList: string[]) {
|
||||
const result = await UserGuildApplyModel.deleteMany({ applyCode: { $in: applyCodeList}, type: GUILD_APPLY_TYPE.APPLY });
|
||||
return result;
|
||||
@@ -50,6 +55,11 @@ export default class UserGuildApply extends BaseModel {
|
||||
return userGuildApply;
|
||||
}
|
||||
|
||||
public static async findApplyByRole(roleId: string) {
|
||||
const userGuildApply: UserGuildApplyType[] = await UserGuildApplyModel.find({ roleId, type: GUILD_APPLY_TYPE.APPLY }).lean();
|
||||
return userGuildApply;
|
||||
}
|
||||
|
||||
public static async getListByApplyCode(applyCodeList: string[]) {
|
||||
const userGuildApply: UserGuildApplyType[] = await UserGuildApplyModel.find({ applyCode: { $in: applyCodeList}, type: GUILD_APPLY_TYPE.APPLY }).lean();
|
||||
return userGuildApply;
|
||||
|
||||
Reference in New Issue
Block a user