diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsHomePageController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsHomePageController.java index 3da4359..abb632f 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsHomePageController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsHomePageController.java @@ -112,5 +112,51 @@ public class CmsHomePageController /*extends JeecgController getindexnewgzdt(CmsArticle cmsArticle, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "6") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap()); + queryWrapper.eq("status", "1"); + queryWrapper.eq("column_id", "1855090037002813441"); + queryWrapper.last("order by publish_time desc"); + Page page = new Page(pageNo, pageSize); + IPage pageList = cmsArticleService.page(page, queryWrapper); + return Result.OK(pageList); + } + + + @ApiOperation(value = "用于首页的通知公告", notes = "用于首页的通知公告") + @GetMapping(value = "/getindexnewtzgg") + public Result getindexnewtzgg(CmsArticle cmsArticle, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "6") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap()); + queryWrapper.eq("status", "1"); + queryWrapper.eq("column_id", "1850793681193787393"); + queryWrapper.last("order by publish_time desc"); + Page page = new Page(pageNo, pageSize); + IPage pageList = cmsArticleService.page(page, queryWrapper); + return Result.OK(pageList); + } + + @ApiOperation(value = "用于首页的新闻快讯", notes = "用于首页的新闻快讯") + @GetMapping(value = "/getindexnewxwlb") + public Result getindexnewxwlb(CmsArticle cmsArticle, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "6") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap()); + queryWrapper.eq("status", "1"); + queryWrapper.eq("column_id", "1717099787538374657"); + queryWrapper.last("order by publish_time desc"); + Page page = new Page(pageNo, pageSize); + IPage pageList = cmsArticleService.page(page, queryWrapper); + return Result.OK(pageList); + } + }