✨ 评论组件增加查看原评论功能
This commit is contained in:
parent
ae5978bba5
commit
65a30ed420
@ -24,6 +24,8 @@ public class CommentDTO {
|
||||
private String commentOriginalAuthorThumbnailURL;
|
||||
/** 父评论作者昵称 */
|
||||
private String commentOriginalAuthorNickname;
|
||||
/** 父评论作者昵称 */
|
||||
private String commentOriginalContent;
|
||||
/** 状态 */
|
||||
private String commentStatus;
|
||||
/** 0:公开回帖,1:匿名回帖 */
|
||||
|
@ -44,12 +44,14 @@ public class CommentServiceImpl extends AbstractService<Comment> implements Comm
|
||||
commentDTO.setCommenter(author);
|
||||
}
|
||||
}
|
||||
if (commentDTO.getCommentOriginalCommentId() != null) {
|
||||
if (commentDTO.getCommentOriginalCommentId() != null && commentDTO.getCommentOriginalCommentId() > 0) {
|
||||
Author commentOriginalAuthor = commentMapper.selectCommentOriginalAuthor(commentDTO.getCommentOriginalCommentId());
|
||||
if (commentOriginalAuthor != null) {
|
||||
commentDTO.setCommentOriginalAuthorThumbnailURL(commentOriginalAuthor.getUserAvatarURL());
|
||||
commentDTO.setCommentOriginalAuthorNickname(commentOriginalAuthor.getUserNickname());
|
||||
}
|
||||
Comment comment = commentMapper.selectByPrimaryKey(commentDTO.getCommentOriginalCommentId());
|
||||
commentDTO.setCommentOriginalContent(comment.getCommentContent());
|
||||
}
|
||||
});
|
||||
return commentDTOList;
|
||||
|
Loading…
Reference in New Issue
Block a user