fix(info-query): 修复查询跨天表第二页查询错误的问题

This commit is contained in:
2023-06-09 14:32:28 +08:00
parent 4024c83c38
commit 6864cf9287
2 changed files with 101 additions and 24 deletions

View File

@@ -60,8 +60,9 @@ public class VersionController extends BaseController {
queryMap.put("filter_schedules", filterSchedules);
}
PageResponse<VersionUpdated> pageResponse = infoService.versionTables(queryMap);
ImmutableList<VersionUpdated> source = Lists.immutable.ofAll(pageResponse.getData());
Long total = pageResponse.getTotal();
ImmutableList<VersionUpdateVO> vos = Lists.immutable.ofAll(pageResponse.getData())
ImmutableList<VersionUpdateVO> vos = source
.asParallel(ExecutorProvider.EXECUTORS, 1)
.collect(item -> {
CompletableFuture<FlinkJob> flinkJobFuture = CompletableFuture.supplyAsync(() -> infoService.flinkJobDetail(item.getFlinkJobId()), ExecutorProvider.EXECUTORS);
@@ -84,6 +85,8 @@ public class VersionController extends BaseController {
.reject(ObjectUtil::isNull)
.toList()
.toImmutable();
return responseCrudData(vos, total);
return responseCrudData(vos, total)
.withData("scheduled", pageResponse.getMetadata().get("scheduled"))
.withData("unScheduled", pageResponse.getMetadata().get("unScheduled"));
}
}