Search in sources :

Example 1 with CommentConditionVO

use of com.zyd.blog.business.vo.CommentConditionVO in project OneBlog by zhangyd-c.

the class BizCommentServiceImpl method listVerifying.

/**
 * 查询未审核的评论
 *
 * @param pageSize
 * @return
 */
@Override
public List<Comment> listVerifying(int pageSize) {
    CommentConditionVO vo = new CommentConditionVO();
    vo.setPageSize(pageSize);
    vo.setStatus(CommentStatusEnum.VERIFYING.toString());
    PageInfo pageInfo = findPageBreakByCondition(vo);
    return null == pageInfo ? null : pageInfo.getList();
}
Also used : CommentConditionVO(com.zyd.blog.business.vo.CommentConditionVO) PageInfo(com.github.pagehelper.PageInfo)

Example 2 with CommentConditionVO

use of com.zyd.blog.business.vo.CommentConditionVO 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);
}
Also used : CommentConditionVO(com.zyd.blog.business.vo.CommentConditionVO) BizComment(com.zyd.blog.persistence.beans.BizComment) RedisCache(com.zyd.blog.business.annotation.RedisCache)

Aggregations

CommentConditionVO (com.zyd.blog.business.vo.CommentConditionVO)2 PageInfo (com.github.pagehelper.PageInfo)1 RedisCache (com.zyd.blog.business.annotation.RedisCache)1 BizComment (com.zyd.blog.persistence.beans.BizComment)1