From cefdac133eed720d83527bceff0bb6c6f3941642 Mon Sep 17 00:00:00 2001 From: xupei Date: Tue, 18 Nov 2025 17:45:11 +0800 Subject: [PATCH] =?UTF-8?q?BUGFIX:=20=E8=8E=B7=E5=8F=96=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=9C=AA=E8=AF=BB=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../da/service/impl/MessageCenterServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/MessageCenterServiceImpl.java b/src/main/java/com/ai/da/service/impl/MessageCenterServiceImpl.java index e31c4ce0..24fd21c5 100644 --- a/src/main/java/com/ai/da/service/impl/MessageCenterServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/MessageCenterServiceImpl.java @@ -64,7 +64,7 @@ public class MessageCenterServiceImpl extends ServiceImpl (String) map.get("type"), map -> Objects.isNull(map.get("count")) ? 0L : (Long) map.get("count"))); - msgTypeCount.put("system", getUnreadSystemNotification()); + msgTypeCount.put("system", getUnreadSystemNotification(accountId)); msgTypeCount.put("newPosted", getNewPostedCount(accountId)); log.info(msgTypeCount.toString()); // 整理数据 加上系统消息未读数 @@ -194,7 +194,7 @@ public class MessageCenterServiceImpl extends ServiceImpl followee = new HashMap<>(); @@ -245,21 +245,21 @@ public class MessageCenterServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(Notification::getType, "system") .and(wrapper -> wrapper .isNull(Notification::getReceiverId) .or() - .eq(Notification::getReceiverId, accountId) + .eq(Notification::getReceiverId, receiverId) ); Long totalSysCount = baseMapper.selectCount(queryWrapper); // 计算单个用户读了多少条系统数据 QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("account_id", accountId); + wrapper.eq("account_id", receiverId); Long readCount = sysNotificationReadStatusMapper.selectCount(wrapper); // 计算差 @@ -416,7 +416,7 @@ public class MessageCenterServiceImpl extends ServiceImpl