|
|
@ -63,8 +63,57 @@ public class CmsHomePageController /*extends JeecgController<CmsColumn, ICmsColu |
|
|
|
public Result<?> getByArticleTitle(CmsArticle cmsArticle, HttpServletRequest req) { |
|
|
|
public Result<?> getByArticleTitle(CmsArticle cmsArticle, HttpServletRequest req) { |
|
|
|
List<CmsArticle> list = cmsArticleService.list(new LambdaQueryWrapper<CmsArticle>() |
|
|
|
List<CmsArticle> list = cmsArticleService.list(new LambdaQueryWrapper<CmsArticle>() |
|
|
|
.eq(CmsArticle::getStatus, "1") |
|
|
|
.eq(CmsArticle::getStatus, "1") |
|
|
|
.eq(CmsArticle::getTitle, cmsArticle.getTitle()) |
|
|
|
.eq(CmsArticle::getId, cmsArticle.getId()) |
|
|
|
.orderByDesc(CmsArticle::getPublishTime)); |
|
|
|
.orderByDesc(CmsArticle::getPublishTime)); |
|
|
|
return Result.OK(list); |
|
|
|
return Result.OK(list); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "用于首页的新闻资讯", notes = "新闻资讯") |
|
|
|
|
|
|
|
@GetMapping(value = "/getindexnew") |
|
|
|
|
|
|
|
public Result<?> getindexnew(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.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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "用于首页的竞赛导航", notes = "竞赛导航") |
|
|
|
|
|
|
|
@GetMapping(value = "/getindexcomp") |
|
|
|
|
|
|
|
public Result<?> getindexcomp(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.eq("column_id", "1712301393339650049"); |
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "用于首页的研究成果", notes = "研究成果") |
|
|
|
|
|
|
|
@GetMapping(value = "/getindexaward") |
|
|
|
|
|
|
|
public Result<?> getindexaward(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.eq("column_id", "1717099355382456322"); |
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|