|
|
|
@ -20,7 +20,7 @@ import com.luoo.music.pojo.Comment;
|
|
|
|
|
|
|
|
|
|
public class CommentMapper {
|
|
|
|
|
public static List<Comment> getList(String journalId, CommentDao commentDao, UserClient userClient) {
|
|
|
|
|
List<Comment> commentList = commentDao.findTop2ByJournalIdOrderByThumbupCountDesc(journalId);
|
|
|
|
|
List<Comment> commentList = commentDao.findTop2ByJournalIdOrderByThumbupCountDescPublishTimeDesc(journalId);
|
|
|
|
|
if (commentList.size() > 0) {
|
|
|
|
|
commentList = commentList.stream().map(comment -> {
|
|
|
|
|
UserInfoDTO userInfoDTO = userClient.findByUserId(comment.getUserId());
|
|
|
|
|