🎨 消息中心展示方式优化
This commit is contained in:
parent
9a2bc1cade
commit
6e0ddd5301
@ -68,19 +68,13 @@ public class NotificationServiceImpl extends AbstractService<Notification> imple
|
||||
notificationDTO.setAuthor(genAuthor(user));
|
||||
break;
|
||||
case "1":
|
||||
// 评论
|
||||
comment = commentService.findById(notification.getDataId().toString());
|
||||
article = articleService.findArticleDTOById(comment.getCommentArticleId(), 0);
|
||||
notificationDTO.setDataTitle(article.getArticleTitle());
|
||||
notificationDTO.setDataUrl(comment.getCommentSharpUrl());
|
||||
user = userService.findById(comment.getCommentAuthorId().toString());
|
||||
notificationDTO.setAuthor(genAuthor(user));
|
||||
// 关注
|
||||
break;
|
||||
case "2":
|
||||
// 回帖
|
||||
comment = commentService.findById(notification.getDataId().toString());
|
||||
Comment originalComment = commentService.findById(comment.getCommentOriginalCommentId().toString());
|
||||
notificationDTO.setDataTitle(originalComment.getCommentContent());
|
||||
article = articleService.findArticleDTOById(comment.getCommentArticleId(), 0);
|
||||
notificationDTO.setDataTitle(article.getArticleTitle());
|
||||
notificationDTO.setDataUrl(comment.getCommentSharpUrl());
|
||||
user = userService.findById(comment.getCommentAuthorId().toString());
|
||||
notificationDTO.setAuthor(genAuthor(user));
|
||||
|
Loading…
Reference in New Issue
Block a user