Search in sources :

Example 1 with Department

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

Example 2 with Department

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

Example 3 with Department

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

Aggregations

PageInfo (com.github.pagehelper.PageInfo)3 Department (com.megagao.production.ssm.domain.Department)3 EUDataGridResult (com.megagao.production.ssm.domain.customize.EUDataGridResult)3 DepartmentExample (com.megagao.production.ssm.domain.DepartmentExample)1