Skip to content

Commit

Permalink
Merge pull request #45 from 1298191366/oracleLimitPage
Browse files Browse the repository at this point in the history
oracle分页优化
  • Loading branch information
zhangdaiscott authored Oct 23, 2024
2 parents a4efe73 + 18874af commit 88e8f62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public String getPageSql(String sql, MiniDaoPage miniDaoPage) {
sqlBuilder.append("SELECT * FROM ( ");
sqlBuilder.append(" SELECT TMP_PAGE.*, ROWNUM PAGEHELPER_ROW_ID FROM ( \n");
sqlBuilder.append(sql);
sqlBuilder.append("\n ) TMP_PAGE)");
sqlBuilder.append(" WHERE PAGEHELPER_ROW_ID <= {2} AND PAGEHELPER_ROW_ID > {0}");
sqlBuilder.append("\n ) TMP_PAGE WHERE ROWNUM <= {2})");
sqlBuilder.append(" WHERE PAGEHELPER_ROW_ID > {0}");
String newSql = sqlBuilder.toString();
newSql = super.format(newSql, super.getPageParam(miniDaoPage));
return newSql;
Expand Down

0 comments on commit 88e8f62

Please sign in to comment.