PageHelper分页

PageHelper.startPage(pageNo, pageSize);
List list = qrCodeMapper.selectList(qrCode);
Page pageList = (Page) list;

pom中引入依赖
   
        com.github.pagehelper
        pagehelper-spring-boot-starter
        1.4.1
    

//引用代码
PageHelper.startPage(pageIndex, pageSize);
List list = instructLogMapper.selectReturn(instructLog);
PageInfo pageInfo = new PageInfo<>(list);
Result> result = JsonReturnUtil.success(pageInfo.getList(),pageInfo.getTotal());
return result;

你可能感兴趣的:(PageHelper分页)