Search in sources :

Example 1 with SysSocialConfig

use of com.zyd.blog.persistence.beans.SysSocialConfig in project OneBlog by zhangyd-c.

the class SysSocialConfigServiceImpl method getByPlatform.

@Override
public SocialConfig getByPlatform(String platform) {
    if (StringUtil.isEmpty(platform)) {
        return null;
    }
    Example example = new Example(SysSocialConfig.class);
    Example.Criteria criteria = example.createCriteria();
    criteria.andEqualTo("platform", platform.toLowerCase());
    SysSocialConfig sysSocialConfig = sysSocialConfigMapper.selectOneByExample(example);
    if (null == sysSocialConfig) {
        return null;
    }
    return new SocialConfig(sysSocialConfig);
}
Also used : Example(tk.mybatis.mapper.entity.Example) SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig) SocialConfig(com.zyd.blog.business.entity.SocialConfig) SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig)

Example 2 with SysSocialConfig

use of com.zyd.blog.persistence.beans.SysSocialConfig in project OneBlog by zhangyd-c.

the class SysSocialConfigServiceImpl method getByPrimaryKey.

@Override
public SocialConfig getByPrimaryKey(Long primaryKey) {
    Assert.notNull(primaryKey, "This argument is required; it must not be null");
    SysSocialConfig entity = sysSocialConfigMapper.selectByPrimaryKey(primaryKey);
    return null == entity ? null : new SocialConfig(entity);
}
Also used : SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig) SocialConfig(com.zyd.blog.business.entity.SocialConfig) SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig)

Example 3 with SysSocialConfig

use of com.zyd.blog.persistence.beans.SysSocialConfig in project OneBlog by zhangyd-c.

the class SysSocialConfigServiceImpl method getByClientId.

@Override
public SocialConfig getByClientId(String clientId) {
    Assert.notNull(clientId, "This argument is required; it must not be null");
    SysSocialConfig entity = sysSocialConfigMapper.getByClientId(clientId);
    return null == entity ? null : new SocialConfig(entity);
}
Also used : SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig) SocialConfig(com.zyd.blog.business.entity.SocialConfig) SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig)

Example 4 with SysSocialConfig

use of com.zyd.blog.persistence.beans.SysSocialConfig in project OneBlog by zhangyd-c.

the class SysSocialConfigServiceImpl method findPageBreakByCondition.

@Override
public PageInfo<SocialConfig> findPageBreakByCondition(SocialConfigConditionVO vo) {
    PageHelper.startPage(vo.getPageNumber(), vo.getPageSize());
    List<SysSocialConfig> list = sysSocialConfigMapper.findPageBreakByCondition(vo);
    if (CollectionUtils.isEmpty(list)) {
        return null;
    }
    PageInfo bean = new PageInfo<SysSocialConfig>(list);
    bean.setList(list.stream().map(SocialConfig::new).collect(Collectors.toList()));
    return bean;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig) SocialConfig(com.zyd.blog.business.entity.SocialConfig) SysSocialConfig(com.zyd.blog.persistence.beans.SysSocialConfig)

Aggregations

SocialConfig (com.zyd.blog.business.entity.SocialConfig)4 SysSocialConfig (com.zyd.blog.persistence.beans.SysSocialConfig)4 PageInfo (com.github.pagehelper.PageInfo)1 Example (tk.mybatis.mapper.entity.Example)1