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

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

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

Loading…
Cancel
Save