bladex分页
/** * 分页查询 * @param entity * @return */ @GetMapping("getPageList") public R<IPage<ConsumptionMachineVO>> getPageList(@ApiIgnore @RequestParam Map<String, Object> entity, Query query){ QueryWrapper<ConsumptionMachine> queryWrapper=Condition.getQueryWrapper(entity,ConsumptionMachine.class).orderByDesc("id"); if(entity.containsKey("startMealDate")&& entity.containsKey("endMealDate")){ Date startMealDate=CMDateTimeUtil.getDateFromString(String.valueOf(entity.get("startMealDate"))); Date endMealDate=CMDateTimeUtil.getDateFromString(String.valueOf(entity.get("endMealDate"))); Map<String,Object>map=new HashMap<>(); map.putAll(entity); map.remove("startMealDate"); map.remove("endMealDate"); map.remove("current"); map.remove("size"); queryWrapper=Condition.getQueryWrapper(map, ConsumptionMachine.class).orderByDesc("id").between("posoptime",startMealDate,endMealDate); } IPage<ConsumptionMachine> pages = consumptionMachineService.page(Condition.getPage(query), queryWrapper); return R.data(ConsumptionMachineWrapper.build().pageVO(pages)); }