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);
}
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);
}
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);
}
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;
}
Aggregations