use of com.zyd.blog.persistence.beans.BizComment in project OneBlog by zhangyd-c.
the class BizCommentServiceImpl method findPageBreakByCondition.
/**
* 分页查询
*
* @param vo
* @return
*/
@Override
public PageInfo<Comment> findPageBreakByCondition(CommentConditionVO vo) {
PageHelper.startPage(vo.getPageNumber(), vo.getPageSize());
List<BizComment> list = bizCommentMapper.findPageBreakByCondition(vo);
List<Comment> boList = this.getComments(list);
if (boList == null) {
return null;
}
PageInfo bean = new PageInfo<BizComment>(list);
bean.setList(boList);
return bean;
}
use of com.zyd.blog.persistence.beans.BizComment in project OneBlog by zhangyd-c.
the class BizCommentServiceImpl method getByPrimaryKey.
@Override
public Comment getByPrimaryKey(Long primaryKey) {
Assert.notNull(primaryKey, "PrimaryKey不可为空!");
BizComment entity = bizCommentMapper.getById(primaryKey);
return null == entity ? null : new Comment(entity);
}
use of com.zyd.blog.persistence.beans.BizComment in project OneBlog by zhangyd-c.
the class BizCommentServiceImpl method listRecentComment.
/**
* 查询近期评论
*
* @param pageSize
* @return
*/
@Override
@RedisCache
public List<Comment> listRecentComment(int pageSize) {
CommentConditionVO vo = new CommentConditionVO();
vo.setPageSize(pageSize);
vo.setStatus(CommentStatusEnum.APPROVED.toString());
PageHelper.startPage(vo.getPageNumber(), vo.getPageSize());
List<BizComment> list = bizCommentMapper.findPageBreakByCondition(vo);
return getComments(list);
}
Aggregations