use of com.zyd.blog.persistence.beans.SysTemplate in project OneBlog by zhangyd-c.
the class SysTemplateServiceImpl method listAll.
@Override
public List<Template> listAll() {
List<SysTemplate> entityList = sysTemplateMapper.selectAll();
if (CollectionUtils.isEmpty(entityList)) {
return null;
}
List<Template> list = new ArrayList<>();
for (SysTemplate entity : entityList) {
list.add(new Template(entity));
}
return list;
}
use of com.zyd.blog.persistence.beans.SysTemplate in project OneBlog by zhangyd-c.
the class SysTemplateServiceImpl method findPageBreakByCondition.
/**
* 分页查询
*
* @param vo
* @return
*/
@Override
public PageInfo<Template> findPageBreakByCondition(TemplateConditionVO vo) {
PageHelper.startPage(vo.getPageNumber(), vo.getPageSize());
List<SysTemplate> list = sysTemplateMapper.findPageBreakByCondition(vo);
if (CollectionUtils.isEmpty(list)) {
return null;
}
List<Template> boList = new ArrayList<>();
for (SysTemplate sysTemplate : list) {
boList.add(new Template(sysTemplate));
}
PageInfo bean = new PageInfo<SysTemplate>(list);
bean.setList(boList);
return bean;
}
use of com.zyd.blog.persistence.beans.SysTemplate in project OneBlog by zhangyd-c.
the class SysTemplateServiceImpl method getTemplate.
@Override
public Template getTemplate(String key) {
if (StringUtils.isEmpty(key)) {
return null;
}
SysTemplate entity = new SysTemplate();
entity.setRefKey(key);
entity = this.sysTemplateMapper.selectOne(entity);
return null == entity ? null : new Template(entity);
}
use of com.zyd.blog.persistence.beans.SysTemplate in project OneBlog by zhangyd-c.
the class SysTemplateServiceImpl method getByPrimaryKey.
@Override
public Template getByPrimaryKey(Long primaryKey) {
Assert.notNull(primaryKey, "PrimaryKey不可为空!");
SysTemplate entity = sysTemplateMapper.selectByPrimaryKey(primaryKey);
return null == entity ? null : new Template(entity);
}
Aggregations