完善展示当前站点最新发布的文章

master
rong.liu 2 years ago
parent bee2634885
commit 9cc0bd32ee
  1. 7
      src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java

@ -58,10 +58,9 @@ public class SysContentServiceImpl extends ServiceImpl<SysContentMapper, SysCont
public R newlyPublishedArticles(PageContentReqVO reqVO) {
QueryWrapper<SysContent> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("site_id", reqVO.getSiteId());
queryWrapper.eq("is_release", 1);
queryWrapper.eq("deleted", 1).orderByDesc("create_time");
Page<PageContentRespVO> page = new Page<PageContentRespVO>(reqVO.getPageNum(), reqVO.getPageSize());
IPage<PageContentRespVO> pageList = baseMapper.articlePaginationList(page, reqVO);
queryWrapper.eq("is_release", 1).orderByDesc("create_time");
Page<SysContent> page = new Page<SysContent>(reqVO.getPageNum(), reqVO.getPageSize());
IPage<SysContent> pageList = baseMapper.selectPage(page, queryWrapper);
return R.success(pageList);
}
}

Loading…
Cancel
Save