code: public Page getPage(Object parameterObject, RowBounds rowBounds) {
          Page page = PageHelper.getLocalPage();
          if (page == null) {
              if (rowBounds != RowBounds.DEFAULT) {
                  if (offsetAsPageNum) {
                      page = new Page(rowBounds.getOffset(), rowBounds.getLimit(), rowBoundsWithCount);
                  } else {
                      page = new Page(new int[]{rowBounds.getOffset(), rowBounds.getLimit()}, rowBoundsWithCount);
                      //offsetAsPageNum=false的时候，由于PageNum问题，不能使用reasonable，这里会强制为false
                      page.setReasonable(false);
                  }
                  if(rowBounds instanceof PageRowBounds){
                      PageRowBounds pageRowBounds = (PageRowBounds)rowBounds;
                      page.setCount(pageRowBounds.getCount() == null || pageRowBounds.getCount());
                  }
              } else if(parameterObject instanceof IPage || supportMethodsArguments){
                  try {
                      page = PageObjectUtil.getPageFromObject(parameterObject, false);
                  } catch (Exception e) {
                      return null;
                  }
              }
              if(page == null){
                  return null;
              }
              PageHelper.setLocalPage(page);
          }
          //分页合理化
          if (page.getReasonable() == null) {
              page.setReasonable(reasonable);
          }
          //当设置为true的时候，如果pagesize设置为0（或RowBounds的limit=0），就不执行分页，返回全部结果
          if (page.getPageSizeZero() == null) {
              page.setPageSizeZero(pageSizeZero);
          }
          return page;
      }
docs: 获取分页参数
  
  @param parameterObject
  @param rowBounds
  @return