Guns分页

 逻辑分页:

  • Guns的默认实现

  • 实现方式:

xxx.js中

 table.setPaginationType("client");

xxxController中

  @RequestMapping(value = "/list")
    @ResponseBody
    public Object list(String condition) {
   
    //使用逻辑分页
      return contractService.selectList(null);
    }

物理分页

  • 原理:

  1. 按照要求查询数据

  2. 数据返回前端

rows

total

  • 实现方式

xxx.js中

 table.setPaginationType("server");

xxxController中

 public Object list(String condition) {

        //使用物理分页
        Page<Contract>page = new Page<Contract>();
        page = contractService.selectPage(page);
        PageInfoBT<Contract> pageInfoBT =this.packForBT(page);
        return pageInfoBT;
}
  • 加入数据库分页语句
  • Page对象

猜你喜欢

转载自blog.csdn.net/weixin_40308688/article/details/81671424