mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-12 15:35:38 +08:00
fix(notify): 修复铃铛红点不消失(已忽略公告误计为未读)
unreadCount 的已读集合改用 findAllByUser(含已忽略), 与 list() 已读判定对齐, 避免已忽略公告被反复计为未读导致红点常亮
This commit is contained in:
@@ -47,8 +47,8 @@ public class NotifyUserNoticeService {
|
||||
Long userId = SecurityUtil.getUserId();
|
||||
// 可见公告
|
||||
List<NotifyNotice> visibleNotices = findVisibleNotices();
|
||||
// 用户已读(且未忽略)的公告id集合
|
||||
Set<Long> readNoticeIds = readManager.findAllByUserAndNotIgnored(userId).stream()
|
||||
// 用户已读的公告id集合(含被忽略的, 忽略视同已读, 与 list() 判定一致, 避免已忽略公告被反复计为未读)
|
||||
Set<Long> readNoticeIds = readManager.findAllByUser(userId).stream()
|
||||
.map(NotifyNoticeRead::getNoticeId)
|
||||
.collect(Collectors.toSet());
|
||||
int noticeUnread = (int) visibleNotices.stream()
|
||||
|
||||
Reference in New Issue
Block a user