Skip to content

Commit

Permalink
[ISSUE alibaba#8318] fix findAllConfigInfoForDumpAll sql args error (a…
Browse files Browse the repository at this point in the history
…libaba#8319)

* [ISSUE alibaba#8318] fix findAllConfigInfoForDumpAll sql args error

Close alibaba#8318

* [ISSUE alibaba#8318] remove the unnecessary arg

Close alibaba#8318
  • Loading branch information
onewe authored May 13, 2022
1 parent c68956b commit eff327d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ public Page<ConfigInfoWrapper> findAllConfigInfoForDumpAll(final int pageNo, fin

PaginationHelper<ConfigInfoWrapper> helper = createPaginationHelper();

return helper.fetchPageLimit(sqlCountRows, sqlFetchRows, EMPTY_ARRAY, pageNo, pageSize,
return helper.fetchPageLimit(sqlCountRows, sqlFetchRows, new Object[] {(pageNo - 1) * pageSize, pageSize}, pageNo, pageSize,
CONFIG_INFO_WRAPPER_ROW_MAPPER);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1435,13 +1435,11 @@ public Page<ConfigInfoWrapper> findAllConfigInfoForDumpAll(final int pageNo, fin
+ " g, config_info t WHERE g.id = t.id ";
PaginationHelper<ConfigInfoWrapper> helper = createPaginationHelper();

List<String> params = new ArrayList<String>();

try {
return helper.fetchPageLimit(sqlCountRows, sqlFetchRows, params.toArray(), pageNo, pageSize,
return helper.fetchPageLimit(sqlCountRows, sqlFetchRows, new Object[] {(pageNo - 1) * pageSize, pageSize}, pageNo, pageSize,
CONFIG_INFO_WRAPPER_ROW_MAPPER);
} catch (CannotGetJdbcConnectionException e) {
LogUtil.FATAL_LOG.error("[db-error] " + e.toString(), e);
LogUtil.FATAL_LOG.error("[db-error]", e);
throw e;
}
}
Expand Down

0 comments on commit eff327d

Please sign in to comment.