puplic api return total count in response

This commit is contained in:
Bernaldo Mihasi 2023-03-03 11:44:21 +02:00
parent 7af27c73cf
commit 87c9730524
2 changed files with 1 additions and 7 deletions

View File

@ -57,8 +57,6 @@ public class DataManagementPlanPublicManager {
dataTable.setTotalCount(count); dataTable.setTotalCount(count);
}); });
CompletableFuture.allOf(itemsFuture, countFuture).join(); CompletableFuture.allOf(itemsFuture, countFuture).join();
if(dataTable.getTotalCount() > dmpTableRequest.getLength())
dataTable.setTotalCount((long)dmpTableRequest.getLength());
return dataTable; return dataTable;
} }

View File

@ -113,11 +113,7 @@ public class DatasetPublicManager {
select(this::mapPublicModel); select(this::mapPublicModel);
dataTable.setData(datasetLists.stream().filter(Objects::nonNull).collect(Collectors.toList())); dataTable.setData(datasetLists.stream().filter(Objects::nonNull).collect(Collectors.toList()));
if(count <= datasetTableRequest.getLength()) dataTable.setTotalCount(count);
dataTable.setTotalCount(count);
else
dataTable.setTotalCount((long)datasetTableRequest.getLength());
//CompletableFuture.allOf(countFuture).join();
return dataTable; return dataTable;
} }