cms查询接口

master
王家东 2 weeks ago
parent b675c32735
commit b515ddc4f4
  1. 15
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsHomePageController.java

@ -158,5 +158,20 @@ public class CmsHomePageController /*extends JeecgController<CmsColumn, ICmsColu
return Result.OK(pageList);
}
@ApiOperation(value = "用于首页的新闻资讯", notes = "新闻资讯")
@GetMapping(value = "/getindexnew")
public Result<?> getindexnew(CmsArticle cmsArticle,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "6") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CmsArticle> queryWrapper = QueryGenerator.initQueryWrapper(cmsArticle, req.getParameterMap());
queryWrapper.eq("status", "1");
queryWrapper.eq("column_id", "1717099205205401602");
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