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