Skip to content

Commit

Permalink
CIRC-1933 Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrVidinieiev committed Dec 26, 2023
1 parent 0d9d73a commit 1b03184
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/org/folio/circulation/resources/SlipsResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ private void getMany(RoutingContext routingContext) {

final var userRepository = new UserRepository(clients);
final var itemRepository = new ItemRepository(clients);
final AddressTypeRepository addressTypeRepository = new AddressTypeRepository(clients);
final ServicePointRepository servicePointRepository = new ServicePointRepository(clients);
final PatronGroupRepository patronGroupRepository = new PatronGroupRepository(clients);
final DepartmentRepository departmentRepository = new DepartmentRepository(clients);
final var addressTypeRepository = new AddressTypeRepository(clients);
final var servicePointRepository = new ServicePointRepository(clients);
final var patronGroupRepository = new PatronGroupRepository(clients);
final var departmentRepository = new DepartmentRepository(clients);
final UUID servicePointId = UUID.fromString(
routingContext.request().getParam(SERVICE_POINT_ID_PARAM));

Expand Down Expand Up @@ -142,7 +142,6 @@ private CompletableFuture<Result<Collection<Item>>> fetchItemsForLocations(
log.debug("fetchPagedItemsForLocations:: parameters multipleLocations: {}",
() -> multipleRecordsAsString(multipleLocations));
Collection<Location> locations = multipleLocations.getRecords();

Set<String> locationIds = locations.stream()
.map(Location::getId)
.filter(StringUtils::isNoneBlank)
Expand All @@ -157,7 +156,6 @@ private CompletableFuture<Result<Collection<Item>>> fetchItemsForLocations(
List<String> itemStatusValues = itemStatuses.stream()
.map(ItemStatus::getValue)
.toList();

Result<CqlQuery> statusQuery = exactMatchAny(STATUS_NAME_KEY, itemStatusValues);

return itemRepository.findByIndexNameAndQuery(locationIds, EFFECTIVE_LOCATION_ID_KEY, statusQuery)
Expand Down

0 comments on commit 1b03184

Please sign in to comment.