Commit 54b3f5b2 authored by 刘基明's avatar 刘基明

评论的评论

parent 2f2140ba
...@@ -101,13 +101,15 @@ public class CommentManager { ...@@ -101,13 +101,15 @@ public class CommentManager {
if (themeEntity == null) { if (themeEntity == null) {
throw new BizException(ErrorCodeConstant.UNREACHABLE); throw new BizException(ErrorCodeConstant.UNREACHABLE);
} }
notificationService.insert(userId, themeEntity.getAuthorId(), NotificationTypeEnum.COMMENT, commentEntity.getCommentId(), req.getComment());
notificationService.putNotifyCache(themeEntity.getAuthorId(), userId, NotificationTypeEnum.COMMENT);
// 回复提醒
// 一级回复通知发帖人,二级回复通知一级评论人
if (StringUtils.isNotBlank(req.getReplyUserId())){ if (StringUtils.isNotBlank(req.getReplyUserId())){
notificationService.insert(userId, req.getReplyUserId(), NotificationTypeEnum.COMMENT_REPLY, commentEntity.getCommentId(), req.getComment()); notificationService.insert(userId, req.getReplyUserId(), NotificationTypeEnum.COMMENT_REPLY, commentEntity.getCommentId(), req.getComment());
notificationService.putNotifyCache(req.getReplyUserId(), userId, NotificationTypeEnum.COMMENT_REPLY); notificationService.putNotifyCache(req.getReplyUserId(), userId, NotificationTypeEnum.COMMENT_REPLY);
}else {
notificationService.insert(userId, themeEntity.getAuthorId(), NotificationTypeEnum.COMMENT, commentEntity.getCommentId(), req.getComment());
notificationService.putNotifyCache(themeEntity.getAuthorId(), userId, NotificationTypeEnum.COMMENT);
} }
......
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