好友:好友信息

This commit is contained in:
luying
2021-09-15 16:32:46 +08:00
parent 7fb9c64587
commit 5d20b0ad75
4 changed files with 17 additions and 14 deletions
+5 -4
View File
@@ -60,14 +60,15 @@ export default class FriendApply extends BaseModel {
// 删除申请
public static async deleteApply(applyCodeList: string[]) {
const result = await FriendApplyModel.deleteMany({ applyCode: { $in: applyCodeList } });
return result;
const { deletedCount } = await FriendApplyModel.deleteMany({ applyCode: { $in: applyCodeList } });
return deletedCount;
}
// 拉黑时删除申请
public static async deleteApplyByRoles(roleId: string, frdRoleId: string) {
const result = await FriendApplyModel.deleteMany({ $or: [{ roleId, frdRoleId}, {roleId: frdRoleId, frdRoleId: roleId}] });
return result;
const { deletedCount: hisRecApplyCount } = await FriendApplyModel.deleteMany({ roleId, frdRoleId });
const { deletedCount: myRecApplyCount } = await FriendApplyModel.deleteMany({ roleId: frdRoleId, frdRoleId: roleId });
return { hisRecApplyCount, myRecApplyCount };
}
public static async deleteAccount(roleId: string) {