use of com.megagao.production.ssm.domain.Department in project production_ssm by megagao.
the class DepartmentServiceImpl method searchDepartmentByDepartmentId.
@Override
public EUDataGridResult searchDepartmentByDepartmentId(Integer page, Integer rows, String departmentId) throws Exception {
// 分页处理
PageHelper.startPage(page, rows);
List<Department> list = departmentMapper.searchDepartmentByDepartmentId(departmentId);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<Department> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
use of com.megagao.production.ssm.domain.Department in project production_ssm by megagao.
the class DepartmentServiceImpl method searchDepartmentByDepartmentName.
@Override
public EUDataGridResult searchDepartmentByDepartmentName(Integer page, Integer rows, String departmentName) throws Exception {
// 分页处理
PageHelper.startPage(page, rows);
List<Department> list = departmentMapper.searchDepartmentByDepartmentName(departmentName);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<Department> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
use of com.megagao.production.ssm.domain.Department in project production_ssm by megagao.
the class DepartmentServiceImpl method getList.
@Override
public EUDataGridResult getList(int page, int rows, Department department) throws Exception {
// 查询部门列表
DepartmentExample example = new DepartmentExample();
// 分页处理
PageHelper.startPage(page, rows);
List<Department> list = departmentMapper.selectByExample(example);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<Department> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
Aggregations