fix:修复预警编辑(全量)新增通知对象保持修改不生效

This commit is contained in:
hardstylewyl 2025-03-27 15:36:15 +08:00
parent 8fff0bf03d
commit c662d8e29a
3 changed files with 3 additions and 3 deletions

View File

@ -405,7 +405,7 @@ public sealed class CompleteWarningHandler : ICompleteWarningHandler, ITransient
// 通知对象
var oldNotifyUserIds = oldRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var postNotifyUserIds = oldRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var postNotifyUserIds = postRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var hasChange = !oldTypes.SetEquals(postTypes) || !oldStatusIds.SetEquals(postStatusIds) || !oldNotifyUserIds.SetEquals(postNotifyUserIds);
return (false, hasChange);
}

View File

@ -616,7 +616,7 @@ public sealed class ReturnWarningHandler : IReturnWarningHandler, ITransientDepe
// 通知对象
var oldNotifyUserIds = oldRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var postNotifyUserIds = oldRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var postNotifyUserIds = postRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var hasChange = !oldStatusIds.SetEquals(postStatusIds) || !oldNotifyUserIds.SetEquals(postNotifyUserIds);
return (false, hasChange);
}

View File

@ -996,7 +996,7 @@ public class TransportWarningHandler : ITransportWarningHandler, ITransientDepen
// 通知对象
var oldNotifyUserIds = oldRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var postNotifyUserIds = oldRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var postNotifyUserIds = postRule.NotifyUsers.Select(x => x.UserId).ToHashSet();
var hasChange = !oldNotifyUserIds.SetEquals(postNotifyUserIds);
return (false, hasChange);
}