use of com.zyd.blog.business.vo.ArticleConditionVO in project OneBlog by zhangyd-c.
the class BizArticleServiceImpl method listRandom.
/**
* 随机文章
*
* @param pageSize
* @return
*/
@Override
public List<Article> listRandom(int pageSize) {
ArticleConditionVO vo = new ArticleConditionVO();
vo.setRandom(true);
vo.setStatus(ArticleStatusEnum.PUBLISHED.getCode());
vo.setPageSize(pageSize);
PageInfo pageInfo = this.findPageBreakByCondition(vo);
return null == pageInfo ? null : pageInfo.getList();
}
use of com.zyd.blog.business.vo.ArticleConditionVO in project OneBlog by zhangyd-c.
the class BizArticleServiceImpl method listRecent.
/**
* 近期文章
*
* @param pageSize
* @return
*/
@Override
public List<Article> listRecent(int pageSize) {
ArticleConditionVO vo = new ArticleConditionVO();
vo.setPageSize(pageSize);
vo.setStatus(ArticleStatusEnum.PUBLISHED.getCode());
PageInfo pageInfo = this.findPageBreakByCondition(vo);
return null == pageInfo ? null : pageInfo.getList();
}
use of com.zyd.blog.business.vo.ArticleConditionVO in project OneBlog by zhangyd-c.
the class RenderController method tag.
/**
* 标签列表
*
* @param tagId
* @param model
* @return
*/
@GetMapping("/tag/{tagId}")
@BussinessLog(value = "进入文章标签[{1}]列表页", platform = PlatformEnum.WEB)
public ModelAndView tag(@PathVariable("tagId") Long tagId, Model model) {
ArticleConditionVO vo = new ArticleConditionVO();
vo.setTagId(tagId);
model.addAttribute("url", "tag/" + tagId);
loadIndexPage(vo, model);
return ResultUtil.view(INDEX_URL);
}
use of com.zyd.blog.business.vo.ArticleConditionVO in project OneBlog by zhangyd-c.
the class RenderController method tag.
/**
* 标签列表(分页)
*
* @param tagId
* @param pageNumber
* @param model
* @return
*/
@GetMapping("/tag/{tagId}/{pageNumber}")
@BussinessLog(value = "进入文章标签[{1}]列表第{2}页", platform = PlatformEnum.WEB)
public ModelAndView tag(@PathVariable("tagId") Long tagId, @PathVariable("pageNumber") Integer pageNumber, Model model) {
ArticleConditionVO vo = new ArticleConditionVO();
vo.setTagId(tagId);
vo.setPageNumber(pageNumber);
model.addAttribute("url", "tag/" + tagId);
loadIndexPage(vo, model);
return ResultUtil.view(INDEX_URL);
}
use of com.zyd.blog.business.vo.ArticleConditionVO in project OneBlog by zhangyd-c.
the class RenderController method type.
/**
* 分类列表(分页)
*
* @param typeId
* @param pageNumber
* @param model
* @return
*/
@GetMapping("/type/{typeId}/{pageNumber}")
@BussinessLog(value = "进入文章分类[{1}]列表第{2}页", platform = PlatformEnum.WEB)
public ModelAndView type(@PathVariable("typeId") Long typeId, @PathVariable("pageNumber") Integer pageNumber, Model model) {
ArticleConditionVO vo = new ArticleConditionVO();
vo.setTypeId(typeId);
vo.setPageNumber(pageNumber);
model.addAttribute("url", "type/" + typeId);
loadIndexPage(vo, model);
return ResultUtil.view(INDEX_URL);
}
Aggregations