Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
import top.naccl.util.markdown.MarkdownUtils;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.*;

/**
* @Description: 博客文章业务层实现
Expand Down Expand Up @@ -130,7 +127,8 @@ public PageResult<BlogInfo> getBlogInfoListByIsPublished(Integer pageNum) {
PageHelper.startPage(pageNum, pageSize, orderBy);
List<BlogInfo> blogInfos = processBlogInfosPassword(blogMapper.getBlogInfoListByIsPublished());
PageInfo<BlogInfo> pageInfo = new PageInfo<>(blogInfos);
PageResult<BlogInfo> pageResult = new PageResult<>(pageInfo.getPages(), pageInfo.getList());
// PageResult<BlogInfo> pageResult = new PageResult<>(pageInfo.getPages(), pageInfo.getList());
PageResult<BlogInfo> pageResult = new PageResult<>(pageInfo.getPages(), new ArrayList<>(pageInfo.getList()));
setBlogViewsFromRedisToPageResult(pageResult);
//添加首页缓存
redisService.saveKVToHash(redisKey, pageNum, pageResult);
Expand Down