Merge remote-tracking branch 'origin/master'

master
zhc077 2 weeks ago
commit b4f52db747
  1. 15
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsHomePageController.java

@ -116,4 +116,19 @@ public class CmsHomePageController /*extends JeecgController<CmsColumn, ICmsColu
}
@ApiOperation(value = "查询全部新闻", notes = "查询全部新闻")
@GetMapping(value = "/cmsfindallnews")
public Result<?> cmsfindallnews(CmsArticle cmsArticle,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CmsArticle> queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap());
queryWrapper.eq("status", "1");
queryWrapper.last("order by publish_time desc");
Page<CmsArticle> page = new Page<CmsArticle>(pageNo, pageSize);
IPage<CmsArticle> pageList = cmsArticleService.page(page, queryWrapper);
return Result.OK(pageList);
}
}

Loading…
Cancel
Save