/** * backend后台分页查询所有订单 * @param page * @param pageSize * @return */ @GetMapping("/page") public R<Page<Orders>> allPage(Integer page, Integer pageSize, Long number, String beginTime, String endTime){ log.info("number:{}, beginTime:{}, endTime:{}", number, beginTime, endTime); //构建分页构造器 Page<Orders> pageInfo = new Page<>(page, pageSize); LambdaQueryWrapper<Orders> queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(number!=null, Orders::getId, number); queryWrapper.le(endTime!=null, Orders::getOrderTime, endTime); queryWrapper.ge(beginTime!=null, Orders::getOrderTime, beginTime); orderService.page(pageInfo, queryWrapper); return R.success(pageInfo); }
标签:queryWrapper,分页,pageSize,number,查询,beginTime,后台,endTime,page From: https://www.cnblogs.com/fxzm/p/17224205.html