use of com.github.pagehelper.PageInfo in project xmall by Exrick.
the class MemberServiceImpl method getMemberList.
@Override
public DataTablesResult getMemberList(int draw, int start, int length, String search, String minDate, String maxDate, String orderCol, String orderDir) {
DataTablesResult result = new DataTablesResult();
try {
// 分页
PageHelper.startPage(start / length + 1, length);
List<TbMember> list = tbMemberMapper.selectByMemberInfo("%" + search + "%", minDate, maxDate, orderCol, orderDir);
PageInfo<TbMember> pageInfo = new PageInfo<>(list);
for (TbMember tbMember : list) {
tbMember.setPassword("");
}
result.setRecordsFiltered((int) pageInfo.getTotal());
result.setRecordsTotal(getMemberCount().getRecordsTotal());
result.setDraw(draw);
result.setData(list);
} catch (Exception e) {
throw new XmallException("加载用户列表失败");
}
return result;
}
use of com.github.pagehelper.PageInfo in project xmall by Exrick.
the class SystemServiceImpl method getLogList.
@Override
public DataTablesResult getLogList(int draw, int start, int length, String search, String orderCol, String orderDir) {
DataTablesResult result = new DataTablesResult();
// 分页
PageHelper.startPage(start / length + 1, length);
List<TbLog> list = tbLogMapper.selectByMulti("%" + search + "%", orderCol, orderDir);
PageInfo<TbLog> pageInfo = new PageInfo<>(list);
result.setRecordsFiltered((int) pageInfo.getTotal());
result.setRecordsTotal(Math.toIntExact(countLog()));
result.setDraw(draw);
result.setData(list);
return result;
}
use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.
the class UacActionMainController method queryUacActionListWithPage.
/**
* 分页查询角色信息.
*
* @param action the action
*
* @return the wrapper
*/
@PostMapping(value = "/queryListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询角色列表")
public Wrapper queryUacActionListWithPage(@ApiParam(name = "action", value = "角色信息") @RequestBody ActionMainQueryDto action) {
logger.info("查询角色列表actionQuery={}", action);
PageInfo pageInfo = uacActionService.queryActionListWithPage(action);
return WrapMapper.ok(pageInfo);
}
use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.
the class UacTokenMainController method queryUacActionListWithPage.
/**
* 分页查询角色信息.
*
* @param token the token
*
* @return the wrapper
*/
@PostMapping(value = "/queryListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询在线用户列表")
public Wrapper queryUacActionListWithPage(@ApiParam(name = "token") @RequestBody TokenMainQueryDto token) {
logger.info("查询在线用户列表. token={}", token);
PageInfo pageInfo = uacUserTokenService.listTokenWithPage(token);
return WrapMapper.ok(pageInfo);
}
use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.
the class OmcOrderController method queryOrderListWithPage.
@PostMapping("queryOrderListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询用户订单列表")
public Wrapper queryOrderListWithPage(@RequestBody OrderPageQuery orderPageQuery) {
logger.info("queryOrderListWithPage - 查询订单集合. orderPageQuery={}", orderPageQuery);
PageInfo pageInfo = omcOrderService.queryOrderListWithPage(orderPageQuery);
return WrapMapper.ok(pageInfo);
}
Aggregations