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