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);
}
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;
}
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;
}
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);
}
Aggregations