Commit dc2f667c authored by 刘基明's avatar 刘基明

点赞评论消息通知 fix

parent b8030743
...@@ -411,7 +411,7 @@ public class ThemeManager { ...@@ -411,7 +411,7 @@ public class ThemeManager {
// 消息通知 // 消息通知
ThemeEntity formerTheme = themeService.queryByThemeId(req.getFormerThemeId()); ThemeEntity formerTheme = themeService.queryByThemeId(req.getFormerThemeId());
if (formerTheme!=null){ if (formerTheme!=null){
notificationService.insertForward(userId, formerTheme.getAuthorId(), formerTheme.getThemeId(), req.getTopicId(), req.getContent().get(0).getValue(), themeEntity.getThemeId()); notificationService.insertForward(userId, formerTheme.getAuthorId(), themeEntity.getThemeId(), req.getTopicId(), req.getContent().get(0).getValue(), themeEntity.getThemeId());
notificationService.putNotifyCache(formerTheme.getAuthorId(), userId, NotificationTypeEnum.FORWARD); notificationService.putNotifyCache(formerTheme.getAuthorId(), userId, NotificationTypeEnum.FORWARD);
} }
......
...@@ -226,11 +226,12 @@ public class NotificationService { ...@@ -226,11 +226,12 @@ public class NotificationService {
} }
// 删除评论及缓存,并更新 // 删除评论通知及缓存,并更新
public void deleteCommentNotify(String notifyUserId, String operatorId, String commentId, LocalDateTime commentTime) { public void deleteCommentNotify(String notifyUserId, String operatorId, String commentId, LocalDateTime commentTime) {
// 物理删除 // 物理删除
NotificationEntity commentNotify = notificationMapper.selectOne(new LambdaQueryWrapper<NotificationEntity>() NotificationEntity commentNotify = notificationMapper.selectOne(new LambdaQueryWrapper<NotificationEntity>()
.eq(NotificationEntity::getTargetId, commentId) .eq(NotificationEntity::getTargetId, commentId)
.eq(NotificationEntity::getOperatorId, operatorId)
.eq(NotificationEntity::getMessageType, NotificationTypeEnum.COMMENT.getType())); .eq(NotificationEntity::getMessageType, NotificationTypeEnum.COMMENT.getType()));
NotificationEntity last = notificationMapper.selectOne(new LambdaQueryWrapper<NotificationEntity>().eq(NotificationEntity::getNotifiedUserId, notifyUserId) NotificationEntity last = notificationMapper.selectOne(new LambdaQueryWrapper<NotificationEntity>().eq(NotificationEntity::getNotifiedUserId, notifyUserId)
.orderByDesc(NotificationEntity::getUpdateTime) .orderByDesc(NotificationEntity::getUpdateTime)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment