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