|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|