use of com.megagao.production.ssm.domain.DepartmentExample in project production_ssm by megagao.
the class DepartmentServiceImpl method searchDepartmentByDepartmentId.
@Override
public List<Department> searchDepartmentByDepartmentId(String departmentId) throws Exception {
DepartmentExample example = new DepartmentExample();
DepartmentExample.Criteria criteria = example.createCriteria();
criteria.andDepartmentIdLike(departmentId);
return departmentMapper.selectByExample(example);
}
use of com.megagao.production.ssm.domain.DepartmentExample 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