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

Fix issues #10973 支持后台分页查询用户 #11102

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

huangkemingyyds
Copy link
Contributor

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

Fix issues #10973
支持后台分页查询用户

Brief changelog

在PaginationHelper插件的fetchPage 分页方法中,追加拼接sql的分页条件的逻辑。

Verifying this change

多造点用户数据,在对应的页面操作即可验证

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

@huangkemingyyds huangkemingyyds changed the title PaginationHelper.fetchPage方法增加分页判断 Fix issues #10973 支持后台分页查询用户 Sep 7, 2023
KomachiSion
KomachiSion previously approved these changes Sep 14, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #11102 (44fce66) into develop (e4190a8) will decrease coverage by 0.02%.
Report is 24 commits behind head on develop.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #11102      +/-   ##
=============================================
- Coverage      53.26%   53.25%   -0.02%     
+ Complexity      5660     5657       -3     
=============================================
  Files            933      935       +2     
  Lines          29786    29816      +30     
  Branches        3292     3294       +2     
=============================================
+ Hits           15866    15878      +12     
- Misses         12521    12531      +10     
- Partials        1399     1407       +8     

see 45 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4190a8...44fce66. Read the comment docs.

@KomachiSion KomachiSion merged commit f79868f into alibaba:develop Sep 22, 2023
@sangyuan6122
Copy link

sangyuan6122 commented Oct 5, 2023

@huangkemingyyds Does the submitted code not need to consider multiple data sources? For example: Oracle
(这段代码不需要考虑多数据源情况吗?例如:oracle)

        String fetchSql = sqlFetchRows;
        if (!fetchSql.contains(PersistenceConstant.LIMIT)) {
            fetchSql += " LIMIT ?, ?";
            Object[] newArgs = Arrays.copyOf(args, args.length + 2);
            newArgs[args.length] = (pageNo - 1) * pageSize;
            newArgs[args.length + 1] = pageSize;
            args = newArgs;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants