Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oracle分页优化 #50

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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