use of com.zyd.blog.persistence.beans.SysLink in project OneBlog by zhangyd-c.
the class SysLinkServiceImpl method getByPrimaryKey.
@Override
public Link getByPrimaryKey(Long primaryKey) {
Assert.notNull(primaryKey, "PrimaryKey不可为空!");
SysLink entity = sysLinkMapper.selectByPrimaryKey(primaryKey);
return null == entity ? null : new Link(entity);
}
use of com.zyd.blog.persistence.beans.SysLink 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.persistence.beans.SysLink 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);
}