BUGFIX: 系统消息发布
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
// 计算单个用户读了多少条系统数据
|
// 计算单个用户读了多少条系统数据
|
||||||
|
|||||||
Reference in New Issue
Block a user