Merge branch 'dev/dev_xp' into dev/3.1_release_merge

This commit is contained in:
2026-01-23 10:54:35 +08:00

View File

@@ -253,12 +253,14 @@ public class MessageCenterServiceImpl extends ServiceImpl<NotificationMapper, No
// 计算总的系统通知数量 // 计算总的系统通知数量
QueryWrapper<Notification> queryWrapper = new QueryWrapper<>(); QueryWrapper<Notification> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Notification::getType, "system") queryWrapper.lambda().eq(Notification::getType, "system")
.gt(Notification::getCreateTime, account.getCreateDate())
.and(wrapper -> wrapper .and(wrapper -> wrapper
.isNull(Notification::getReceiverId) .isNull(Notification::getReceiverId)
.or() .or()
.eq(Notification::getReceiverId, receiverId) .eq(Notification::getReceiverId, receiverId)
); );
if (Objects.nonNull(account)) {
queryWrapper.lambda().gt(Notification::getCreateTime, account.getCreateDate());
}
Long totalSysCount = baseMapper.selectCount(queryWrapper); Long totalSysCount = baseMapper.selectCount(queryWrapper);
// 计算单个用户读了多少条系统数据 // 计算单个用户读了多少条系统数据