Search in sources :

Example 1 with SysLink

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);
}
Also used : Link(com.zyd.blog.business.entity.Link) SysLink(com.zyd.blog.persistence.beans.SysLink) SysLink(com.zyd.blog.persistence.beans.SysLink)

Example 2 with SysLink

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;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) Link(com.zyd.blog.business.entity.Link) SysLink(com.zyd.blog.persistence.beans.SysLink) SysLink(com.zyd.blog.persistence.beans.SysLink)

Example 3 with SysLink

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);
}
Also used : Link(com.zyd.blog.business.entity.Link) SysLink(com.zyd.blog.persistence.beans.SysLink) SysLink(com.zyd.blog.persistence.beans.SysLink)

Aggregations

Link (com.zyd.blog.business.entity.Link)3 SysLink (com.zyd.blog.persistence.beans.SysLink)3 PageInfo (com.github.pagehelper.PageInfo)1