code: protected SelectItem addRowNumber(PlainSelect plainSelect, List<SelectItem> autoItems) {
          //增加ROW_NUMBER()
          StringBuilder orderByBuilder = new StringBuilder();
          orderByBuilder.append("ROW_NUMBER() OVER (");
          if (isNotEmptyList(plainSelect.getOrderByElements())) {
              orderByBuilder.append(PlainSelect.orderByToString(
                      getOrderByElements(plainSelect, autoItems)).substring(1));
              //清空排序列表
              plainSelect.setOrderByElements(null);
          } else {
              orderByBuilder.append("ORDER BY RAND()");
          }
          orderByBuilder.append(") ");
          orderByBuilder.append(PAGE_ROW_NUMBER);
          return new SelectExpressionItem(new Column(orderByBuilder.toString()));
      }
docs: 获取 ROW_NUMBER() 列
  
  @param plainSelect 原查询
  @param autoItems   自动生成的查询列
  @return ROW_NUMBER() 列