Search in sources :

Example 1 with SysRoleExample

use of com.megagao.production.ssm.domain.authority.SysRoleExample in project production_ssm by megagao.

the class RoleServiceImpl method searchSysRoleBySysRoleName.

@Override
public List<RoleVO> searchSysRoleBySysRoleName(String sysRoleName) throws Exception {
    SysRoleExample example = new SysRoleExample();
    SysRoleExample.Criteria criteria = example.createCriteria();
    criteria.andRoleNameLike(sysRoleName);
    return sysRoleMapper.selectByExample(example);
}
Also used : SysRoleExample(com.megagao.production.ssm.domain.authority.SysRoleExample)

Example 2 with SysRoleExample

use of com.megagao.production.ssm.domain.authority.SysRoleExample in project production_ssm by megagao.

the class RoleServiceImpl method getList.

@Override
public EUDataGridResult getList(int page, int rows, RoleVO sysRole) throws Exception {
    // 查询列表
    SysRoleExample example = new SysRoleExample();
    // 分页处理
    PageHelper.startPage(page, rows);
    List<RoleVO> list = sysRoleMapper.selectByExample(example);
    // 创建一个返回值对象
    EUDataGridResult result = new EUDataGridResult();
    result.setRows(list);
    // 取记录总条数
    PageInfo<RoleVO> pageInfo = new PageInfo<>(list);
    result.setTotal(pageInfo.getTotal());
    return result;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) RoleVO(com.megagao.production.ssm.domain.vo.RoleVO) SysRoleExample(com.megagao.production.ssm.domain.authority.SysRoleExample) EUDataGridResult(com.megagao.production.ssm.domain.customize.EUDataGridResult)

Example 3 with SysRoleExample

use of com.megagao.production.ssm.domain.authority.SysRoleExample in project production_ssm by megagao.

the class RoleServiceImpl method findByRoleNameAndId.

@Override
public List<RoleVO> findByRoleNameAndId(String rolename, String id) throws Exception {
    SysRoleExample example = new SysRoleExample();
    SysRoleExample.Criteria criteria = example.createCriteria();
    criteria.andRoleNameEqualTo(rolename);
    if (id != null) {
        criteria.andRoleIdNotEqualTo(id);
    }
    List<RoleVO> sysRoleList = sysRoleMapper.selectByExample(example);
    return sysRoleList;
}
Also used : RoleVO(com.megagao.production.ssm.domain.vo.RoleVO) SysRoleExample(com.megagao.production.ssm.domain.authority.SysRoleExample)

Example 4 with SysRoleExample

use of com.megagao.production.ssm.domain.authority.SysRoleExample in project production_ssm by megagao.

the class RoleServiceImpl method searchSysRoleBySysRoleId.

@Override
public List<RoleVO> searchSysRoleBySysRoleId(String sysRoleId) throws Exception {
    SysRoleExample example = new SysRoleExample();
    SysRoleExample.Criteria criteria = example.createCriteria();
    criteria.andRoleIdLike(sysRoleId);
    return sysRoleMapper.selectByExample(example);
}
Also used : SysRoleExample(com.megagao.production.ssm.domain.authority.SysRoleExample)

Aggregations

SysRoleExample (com.megagao.production.ssm.domain.authority.SysRoleExample)4 RoleVO (com.megagao.production.ssm.domain.vo.RoleVO)2 PageInfo (com.github.pagehelper.PageInfo)1 EUDataGridResult (com.megagao.production.ssm.domain.customize.EUDataGridResult)1