use of com.megagao.production.ssm.domain.authority.SysRolePermissionExample in project production_ssm by megagao.
the class PermissionServiceImpl method getList.
@Override
public EUDataGridResult getList(int page, int rows, SysRolePermission sysRolePermission) throws Exception {
// 查询列表
SysRolePermissionExample example = new SysRolePermissionExample();
// 分页处理
PageHelper.startPage(page, rows);
List<SysRolePermission> list = sysRolePermissionMapper.selectByExample(example);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<SysRolePermission> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
use of com.megagao.production.ssm.domain.authority.SysRolePermissionExample in project production_ssm by megagao.
the class PermissionServiceImpl method getByRoleId.
@Override
public SysRolePermission getByRoleId(String string) throws Exception {
SysRolePermissionExample example = new SysRolePermissionExample();
SysRolePermissionExample.Criteria criteria = example.createCriteria();
criteria.andSysRoleIdEqualTo(string);
return sysRolePermissionMapper.selectByExample(example).get(0);
}
Aggregations