use of com.github.pagehelper.PageInfo in project production_ssm by megagao.
the class CustomServiceImpl method searchCustomByCustomName.
@Override
public EUDataGridResult searchCustomByCustomName(int page, int rows, String customName) throws Exception {
// 分页处理
PageHelper.startPage(page, rows);
List<Custom> list = customMapper.searchCustomByCustomName(customName);
// 创建一个返回值对象
EUDataGridResult result = new EUDataGridResult();
result.setRows(list);
// 取记录总条数
PageInfo<Custom> pageInfo = new PageInfo<>(list);
result.setTotal(pageInfo.getTotal());
return result;
}
use of com.github.pagehelper.PageInfo in project free-framework by a601942905git.
the class RoleController method list.
/**
* 获取角色列表信息
* @return
*/
@GetMapping(RoleControllerMappingUrl.ROLE)
public String list(RoleParam roleParam) {
PageInfo pageInfo = roleService.pageRole(roleParam);
setRequestAttribute("pageInfo", pageInfo);
setRequestAttribute("roleParam", roleParam);
return RoleControllerMappingUrl.PAGE_LIST_RETURN;
}
use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class AbnormalRecordController method selectAbnormalRecordDetails.
/**
* 根据 task_record.id 返回abnormalRecordDetail
*
* @param taskRecordId
* @return
*/
@PostMapping("/selectAbnormalRecordDetails")
public Result selectAbnormalRecordDetails(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size, @RequestParam Integer taskRecordId) {
PageHelper.startPage(page, size);
List<AbnormalRecordDetail> abnormalRecordDetailList = abnormalRecordService.selectAbnormalRecordDetails(taskRecordId);
PageInfo pageInfo = new PageInfo(abnormalRecordDetailList);
return ResultGenerator.genSuccessResult(pageInfo);
}
use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class AbnormalRecordController method list.
@PostMapping("/list")
public Result list(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
PageHelper.startPage(page, size);
List<AbnormalRecord> list = abnormalRecordService.findAll();
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
use of com.github.pagehelper.PageInfo in project sinsim by WilsonHu.
the class AbnormalController method validList.
@PostMapping("/validList")
public Result validList(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
PageHelper.startPage(page, size);
List<Abnormal> list = abnormalService.findAll();
List<Abnormal> resList = new ArrayList<Abnormal>();
for (Abnormal item : list) {
if (item.getValid() == 1) {
resList.add(item);
}
}
list.clear();
PageInfo pageInfo = new PageInfo(resList);
return ResultGenerator.genSuccessResult(pageInfo);
}
Aggregations