diff --git a/src/main/java/com/rymcu/vertical/dto/CommentDTO.java b/src/main/java/com/rymcu/vertical/dto/CommentDTO.java index 0375d6c..64b77ee 100644 --- a/src/main/java/com/rymcu/vertical/dto/CommentDTO.java +++ b/src/main/java/com/rymcu/vertical/dto/CommentDTO.java @@ -23,6 +23,8 @@ public class CommentDTO { private Integer commentOriginalCommentId; /** 父评论作者头像 */ private String commentOriginalAuthorThumbnailURL; + /** 父评论作者昵称 */ + private String commentOriginalAuthorNickname; /** 状态 */ private String commentStatus; /** 0:公开回帖,1:匿名回帖 */ diff --git a/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java b/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java index 2aef75d..6f4c197 100644 --- a/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java +++ b/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java @@ -44,6 +44,7 @@ public class CommentServiceImpl extends AbstractService implements Comm Author commentOriginalAuthor = commentMapper.selectCommentOriginalAuthor(commentDTO.getCommentOriginalCommentId()); if (commentOriginalAuthor != null) { commentDTO.setCommentOriginalAuthorThumbnailURL(commentOriginalAuthor.getUserAvatarURL()); + commentDTO.setCommentOriginalAuthorNickname(commentOriginalAuthor.getUserNickname()); } } });