- Timestamp:
- 10/18/21 00:19:16 (3 years ago)
- Branches:
- master
- Children:
- 188ee53
- Parents:
- fa375fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/LocationServiceImpl.java
rfa375fe reed0bf8 8 8 9 9 import java.util.*; 10 import java.util.stream.Collectors; 10 11 11 12 … … 46 47 public Optional<Location> findById(Long id) { 47 48 return this.locationRepository.findById(id); 49 } 50 51 @Override 52 public List<Location> findLocations(Long locationId, Long companionId, Long lengthOfStay, String categoryIds) { 53 List<Long> categories = null; 54 if(categoryIds != null && !categoryIds.isEmpty()){ 55 List<String> ids = Arrays.asList(categoryIds.split(",")); 56 categories = ids.stream().map(Long::valueOf).collect(Collectors.toList()); 57 } 58 List<Location> foundLocations = locationRepository.findLocationsFromForm(locationId, companionId, categories); 59 return foundLocations; 48 60 } 49 61
Note:
See TracChangeset
for help on using the changeset viewer.