Commit 2f2140ba authored by 刘基明's avatar 刘基明

评论的评论

parent b79edc8a
...@@ -51,6 +51,8 @@ public class ThemeNotifyQo { ...@@ -51,6 +51,8 @@ public class ThemeNotifyQo {
private String content; private String content;
@ApiModelProperty(value = "评论Id") @ApiModelProperty(value = "评论Id")
private String commentId; private String commentId;
@ApiModelProperty(value = "回复的评论Id")
private String replyCommentId;
@ApiModelProperty(value = "转发类型-主题id") @ApiModelProperty(value = "转发类型-主题id")
private String forwardThemeId; private String forwardThemeId;
......
...@@ -105,9 +105,9 @@ public class CommentManager { ...@@ -105,9 +105,9 @@ public class CommentManager {
notificationService.putNotifyCache(themeEntity.getAuthorId(), userId, NotificationTypeEnum.COMMENT); notificationService.putNotifyCache(themeEntity.getAuthorId(), userId, NotificationTypeEnum.COMMENT);
// 回复提醒 // 回复提醒
if (StringUtils.isNotBlank(req.getReplyId())){ if (StringUtils.isNotBlank(req.getReplyUserId())){
notificationService.insert(userId, themeEntity.getAuthorId(), NotificationTypeEnum.COMMENT_REPLY, commentEntity.getReplyId(), req.getComment()); notificationService.insert(userId, req.getReplyUserId(), NotificationTypeEnum.COMMENT_REPLY, commentEntity.getCommentId(), req.getComment());
notificationService.putNotifyCache(themeEntity.getAuthorId(), userId, NotificationTypeEnum.COMMENT_REPLY); notificationService.putNotifyCache(req.getReplyUserId(), userId, NotificationTypeEnum.COMMENT_REPLY);
} }
......
...@@ -102,10 +102,10 @@ public class NotificationManager { ...@@ -102,10 +102,10 @@ public class NotificationManager {
CommentEntity commentEntity = commentService.queryByCommentId(themeNotifyQo.getCommentId()); CommentEntity commentEntity = commentService.queryByCommentId(themeNotifyQo.getCommentId());
if (commentEntity != null) { if (commentEntity != null) {
themeNotifyQo.setFormerThemeId(commentEntity.getThemeId()); themeNotifyQo.setFormerThemeId(commentEntity.getThemeId());
themeNotifyQo.setReplyCommentId(commentEntity.getReplyId());
if (NotificationTypeEnum.COMMENT_LIKE.getCode().equals(themeNotifyQo.getMessageType())) { if (NotificationTypeEnum.COMMENT_LIKE.getCode().equals(themeNotifyQo.getMessageType())) {
themeNotifyQo.setContent(commentEntity.getContent()); themeNotifyQo.setContent(commentEntity.getContent());
} }
} }
} }
...@@ -136,6 +136,14 @@ public class NotificationManager { ...@@ -136,6 +136,14 @@ public class NotificationManager {
if (StringUtils.isNotBlank(themeNotifyQo.getTopicId())) { if (StringUtils.isNotBlank(themeNotifyQo.getTopicId())) {
themeNotifyQo.setTopicTitle(topicService.queryTitleById(themeNotifyQo.getTopicId())); themeNotifyQo.setTopicTitle(topicService.queryTitleById(themeNotifyQo.getTopicId()));
} }
// 评论的评论
if (NotificationTypeEnum.COMMENT.getCode().equals(themeNotifyQo.getMessageType())){
CommentEntity commentEntity = commentService.queryByCommentId(themeNotifyQo.getReplyCommentId());
if (commentEntity != null) {
themeNotifyQo.setFormerContent(commentEntity.getContent());
}
}
// 点赞聚合 // 点赞聚合
if (themeNotifyQo.getLikeUserCount() != null && themeNotifyQo.getLikeUserCount() > 1) { if (themeNotifyQo.getLikeUserCount() != null && themeNotifyQo.getLikeUserCount() > 1) {
List<UserBriefInfoQO> likeUsers = themeNotifyQo.getLikeUsers(); List<UserBriefInfoQO> likeUsers = themeNotifyQo.getLikeUsers();
......
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