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