use of com.megagao.production.ssm.domain.authority.SysUser in project production_ssm by megagao.
the class UserServiceImpl method findByUserNameAndId.
@Override
public List<SysUser> findByUserNameAndId(String username, String id) throws Exception {
SysUserExample example = new SysUserExample();
SysUserExample.Criteria criteria = example.createCriteria();
criteria.andUsernameEqualTo(username);
if (id != null) {
criteria.andIdNotEqualTo(id);
}
List<SysUser> sysUserList = sysUserMapper.selectByExample(example);
return sysUserList;
}
use of com.megagao.production.ssm.domain.authority.SysUser in project production_ssm by megagao.
the class UserServiceImpl method searchUserByUserName.
@Override
public EUDataGridResult searchUserByUserName(Integer page, Integer rows, String userName) throws Exception {
// 分页处理
PageHelper.startPage(page, rows);
List<SysUser> list = sysUserMapper.searchUserByUserName(userName);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<SysUser> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
Aggregations