use of com.zyd.blog.persistence.beans.SysUser in project OneBlog by zhangyd-c.
the class SysUserServiceImpl method getByUserName.
/**
* 根据用户名查找
*
* @param userName
* @return
*/
@Override
public User getByUserName(String userName) {
User user = new User(userName, null);
SysUser sysUser = this.sysUserMapper.selectOne(user.getSysUser());
return null == sysUser ? null : new User(sysUser);
}
use of com.zyd.blog.persistence.beans.SysUser in project OneBlog by zhangyd-c.
the class SysUserServiceImpl method findPageBreakByCondition.
@Override
public PageInfo<User> findPageBreakByCondition(UserConditionVO vo) {
PageHelper.startPage(vo.getPageNumber(), vo.getPageSize());
List<SysUser> sysUsers = sysUserMapper.findPageBreakByCondition(vo);
if (CollectionUtils.isEmpty(sysUsers)) {
return null;
}
List<User> users = new ArrayList<>();
for (SysUser su : sysUsers) {
users.add(new User(su));
}
PageInfo bean = new PageInfo<SysUser>(sysUsers);
bean.setList(users);
return bean;
}