好友:接受申请后应该减掉申请数量

This commit is contained in:
luying
2021-03-27 11:21:28 +08:00
parent 2441a8d473
commit 5fae5ab241

View File

@@ -189,6 +189,7 @@ export class FriendHandler {
result.push(param);
}
await FriendApplyModel.deleteApply(delApplyCodeList);
await RoleModel.increaseFriendApplyCnt(roleId, -1 * delApplyCodeList.length, 50);
return resResult(STATUS.SUCCESS, {
list: result
@@ -255,6 +256,7 @@ export class FriendHandler {
}
await FriendApplyModel.deleteApply(resultApplyCodeList);
await RoleModel.increaseFriendApplyCnt(roleId, -1 * resultApplyCodeList.length, 50);
// 特殊处理:如果他点一键同意,有很多人,这个单独的人就不做这个额外的提示,直接把他好友申请删掉就好
if(str == getResStr(STATUS.FRIEND_HAS_ADD) && resultApplyCodeList.length > 1) str = '';
@@ -393,6 +395,7 @@ export class FriendHandler {
await FriendRelationModel.moveFromFriend(hisRoleId, role, friendShip, false, !!curFriend); //从对方好友删除
await FriendRelationModel.moveFromFriend(roleId, friend, friendShip, true, !!curFriend); // 删除好友关系并拉黑
await FriendApplyModel.deleteApplyByRoles(roleId, hisRoleId); // 删除双方的申请
await RoleModel.increaseFriendApplyCnt(roleId, -1, 50);
let param = new BlackListParam(friend);
let isOnline = await isRoleOnline(friend.roleId);