|
|
|
@ -28,7 +28,7 @@ public class CommentMapper {
|
|
|
|
|
*/
|
|
|
|
|
CommentDTO commentDTO=new CommentDTO();
|
|
|
|
|
|
|
|
|
|
List<Comment> commentList =commentDao.findTop5ByJournalIdOrderByThumbupCountDesc(journalId);
|
|
|
|
|
List<Comment> commentList =commentDao.findTop2ByJournalIdOrderByThumbupCountDesc(journalId);
|
|
|
|
|
commentDTO.setCommentList(commentList);
|
|
|
|
|
/**
|
|
|
|
|
* 获取期刊总评论数 一级评论数加上父评论的总回复数
|
|
|
|
@ -62,7 +62,7 @@ public class CommentMapper {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static List<Comment> getList(String journalId,CommentDao commentDao,UserClient userClient){
|
|
|
|
|
List<Comment> commentList =commentDao.findTop5ByJournalIdOrderByThumbupCountDesc(journalId);
|
|
|
|
|
List<Comment> commentList =commentDao.findTop2ByJournalIdOrderByThumbupCountDesc(journalId);
|
|
|
|
|
if(commentList.size()>0){
|
|
|
|
|
commentList= commentList.stream().map(comment -> {
|
|
|
|
|
UserInfoDTO userInfoDTO =userClient.findByUserId(comment.getUserId());
|
|
|
|
|