Skip to content

Fixed pagination issue #1343

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

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
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 @@ -119,7 +119,7 @@ public Mono<ResponseView<DatasourceStructure>> getStructure(@PathVariable String
*/
@Override
public Mono<PageResponseView<?>> listJsDatasourcePlugins(@RequestParam("appId") String applicationId, @RequestParam(required = false) String name, @RequestParam(required = false) String type,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "0") int pageSize) {
String objectId = gidService.convertApplicationIdToObjectId(applicationId);
return fluxToPageResponseView(pageNum, pageSize, datasourceApiService.listJsDatasourcePlugins(objectId, name, type));
Expand All @@ -142,7 +142,7 @@ public Mono<ResponseView<List<Object>>> getPluginDynamicConfig(
@SneakyThrows
@Override
public Mono<PageResponseView<?>> listOrgDataSources(@RequestParam(name = "orgId") String orgId, @RequestParam(required = false) String name, @RequestParam(required = false) String type,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "0") int pageSize) {
if (StringUtils.isBlank(orgId)) {
return ofError(BizError.INVALID_PARAMETER, "ORG_ID_EMPTY");
Expand All @@ -153,7 +153,7 @@ public Mono<PageResponseView<?>> listOrgDataSources(@RequestParam(name = "orgId"

@Override
public Mono<PageResponseView<?>> listAppDataSources(@RequestParam(name = "appId") String applicationId, @RequestParam(required = false) String name, @RequestParam(required = false) String type,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "0") int pageSize) {
if (StringUtils.isBlank(applicationId)) {
return ofError(BizError.INVALID_PARAMETER, "INVALID_APP_ID");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Mono<ResponseView<DatasourceStructure>> getStructure(@PathVariable String
)
@GetMapping("/jsDatasourcePlugins")
public Mono<PageResponseView<?>> listJsDatasourcePlugins(@RequestParam("appId") String applicationId, @RequestParam(required = false) String name, @RequestParam(required = false) String type,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "0") int pageSize);

/**
Expand All @@ -127,7 +127,7 @@ public Mono<ResponseView<List<Object>>> getPluginDynamicConfig(
@JsonView(JsonViews.Public.class)
@GetMapping("/listByOrg")
public Mono<PageResponseView<?>> listOrgDataSources(@RequestParam(name = "orgId") String orgId, @RequestParam String name, @RequestParam String type,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "0") int pageSize);

@Operation(
Expand All @@ -140,7 +140,7 @@ public Mono<PageResponseView<?>> listOrgDataSources(@RequestParam(name = "orgId"
@JsonView(JsonViews.Public.class)
@GetMapping("/listByApp")
public Mono<PageResponseView<?>> listAppDataSources(@RequestParam(name = "appId") String applicationId, @RequestParam String name, @RequestParam String type,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "0") int pageSize);

@Operation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public Mono<ResponseView<List<LibraryQueryAggregateView>>> dropDownList(@Request

@Override
public Mono<PageResponseView<?>> list(@RequestParam(required = false, defaultValue = "") String name,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "100") int pageSize) {
var flux = libraryQueryApiService.listLibraryQueries(name)
.flatMapMany(Flux::fromIterable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface LibraryQueryEndpoints
)
@GetMapping("/listByOrg")
public Mono<PageResponseView<?>> list(@RequestParam(required = false, defaultValue = "") String name,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "100") int pageSize);

@Operation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Mono<Void> delete(@PathVariable String libraryQueryRecordId) {

@Override
public Mono<PageResponseView<?>> getByLibraryQueryId(@RequestParam(name = "libraryQueryId") String libraryQueryId,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "100") int pageSize) {
return fluxToPageResponseView(pageNum, pageSize, libraryQueryRecordApiService.getByLibraryQueryId(libraryQueryId).flatMapMany(Flux::fromIterable));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface LibraryQueryRecordEndpoints
)
@GetMapping("/listByLibraryQueryId")
public Mono<PageResponseView<?>> getByLibraryQueryId(@RequestParam(name = "libraryQueryId") String libraryQueryId,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "100") int pageSize);

@Operation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public Mono<GroupListResponseView<List<GroupView>>> getOrgGroups(@RequestParam(r

@Override
public Mono<ResponseView<GroupMemberAggregateView>> getGroupMembers(@PathVariable String groupId,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "100") int pageSize) {
String objectId = gidService.convertGroupIdToObjectId(groupId);
return groupApiService.getGroupMembers(objectId, pageNum, pageSize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Mono<GroupListResponseView<List<GroupView>>> getOrgGroups(@RequestParam(r
)
@GetMapping("/{groupId}/members")
public Mono<ResponseView<GroupMemberAggregateView>> getGroupMembers(@PathVariable String groupId,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "100") int pageSize);

@Operation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Mono<ResponseView<Boolean>> deleteLogo(@PathVariable String orgId) {

@Override
public Mono<ResponseView<OrgMemberListView>> getOrgMembers(@PathVariable String orgId,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "1000") int pageSize) {
String id = gidService.convertOrganizationIdToObjectId(orgId);
return orgApiService.getOrganizationMembers(id, pageNum, pageSize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public Mono<ResponseView<Boolean>> uploadLogo(@PathVariable String orgId,
)
@GetMapping("/{orgId}/members")
public Mono<ResponseView<OrgMemberListView>> getOrgMembers(@PathVariable String orgId,
@RequestParam(required = false, defaultValue = "0") int pageNum,
@RequestParam(required = false, defaultValue = "1") int pageNum,
@RequestParam(required = false, defaultValue = "1000") int pageSize);

@Operation(
Expand Down