若依post请求分页

473 阅读1分钟

若依的分页不支持post请求,如果是post请求会造成分页失效

post请求分页使用PageHelper的分页就会生效

@PostMapping("/lookProductUser")
public TableDataInfo lookProductUser(@RequestBody  Map<String,Object> params) throws ParseException {
    PageHelper.startPage((Integer) params.get("pageNumber"), (Integer) params.get("pageSize"), "");
    if (ObjectUtils.isEmpty(params.get("productId"))){
        return getDataTable(new ArrayList<>());
    }
    return getDataTable(auctionProduct.lookProductUser(params));
}