Search in sources :

Example 6 with SysUser

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;
}
Also used : SysUser(com.megagao.production.ssm.domain.authority.SysUser) SysUserExample(com.megagao.production.ssm.domain.authority.SysUserExample)

Example 7 with SysUser

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;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) SysUser(com.megagao.production.ssm.domain.authority.SysUser) EUDataGridResult(com.megagao.production.ssm.domain.customize.EUDataGridResult)

Aggregations

SysUser (com.megagao.production.ssm.domain.authority.SysUser)7 PageInfo (com.github.pagehelper.PageInfo)4 EUDataGridResult (com.megagao.production.ssm.domain.customize.EUDataGridResult)4 SysUserExample (com.megagao.production.ssm.domain.authority.SysUserExample)2 SysPermission (com.megagao.production.ssm.domain.authority.SysPermission)1 ActiveUser (com.megagao.production.ssm.domain.customize.ActiveUser)1 RoleVO (com.megagao.production.ssm.domain.vo.RoleVO)1 AuthenticationException (org.apache.shiro.authc.AuthenticationException)1 SimpleAuthenticationInfo (org.apache.shiro.authc.SimpleAuthenticationInfo)1