use of com.zyd.blog.business.entity.Link in project OneBlog by zhangyd-c.
the class SysLinkServiceImpl method findPageBreakByCondition.
@Override
public PageInfo<Link> findPageBreakByCondition(LinkConditionVO vo) {
PageHelper.startPage(vo.getPageNumber(), vo.getPageSize());
List<SysLink> list = sysLinkMapper.findPageBreakByCondition(vo);
if (CollectionUtils.isEmpty(list)) {
return null;
}
List<Link> boList = new ArrayList<>();
for (SysLink sysLink : list) {
boList.add(new Link(sysLink));
}
PageInfo bean = new PageInfo<SysLink>(list);
bean.setList(boList);
return bean;
}
use of com.zyd.blog.business.entity.Link in project OneBlog by zhangyd-c.
the class SysLinkServiceImpl method getOneByUrl.
@Override
public Link getOneByUrl(String url) {
SysLink l = new SysLink();
l.setUrl(url);
l = sysLinkMapper.selectOne(l);
return null == l ? null : new Link(l);
}
use of com.zyd.blog.business.entity.Link in project OneBlog by zhangyd-c.
the class SysLinkServiceImpl method listOfInside.
/**
* 查询可在内页显示的友情链接列表
*
* @return
*/
@Override
@RedisCache
public List<Link> listOfInside() {
LinkConditionVO vo = new LinkConditionVO(1, 0);
vo.setPageSize(100);
PageInfo<Link> pageInfo = this.findPageBreakByCondition(vo);
return pageInfo == null ? null : pageInfo.getList();
}
Aggregations