好友:特殊情况处理

This commit is contained in:
luying
2021-02-25 11:35:41 +08:00
parent 3e4c7f5d49
commit 47c3c093f2
2 changed files with 21 additions and 2 deletions

View File

@@ -64,6 +64,11 @@ export default class FriendApply extends BaseModel {
return result;
}
// 拉黑时删除申请
public static async deleteApplyByRoles(roleId: string, frdRoleId: string) {
const result = await FriendApplyModel.deleteMany({ $or: [{ roleId, frdRoleId}, {roleId: frdRoleId, frdRoleId: roleId}] });
return result;
}
public static async deleteAccount(roleId: string) {
let result = await FriendApplyModel.deleteMany({ $or: [{ roleId: roleId }, { frdRoleId: roleId }] });