include supporting trip ids in regulartrip dto that is used for carrousel display
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -28,6 +28,8 @@ public class MinimalDetectedRegularTripDTO {
|
||||
private LocalTime arrivalWindowStart;
|
||||
@Schema(description = "Latest arrival time among the supporting trips, in the user's local time")
|
||||
private LocalTime arrivalWindowEnd;
|
||||
@Schema(description = "Backend trip ids of the trips that support this detected regular trip.")
|
||||
private List<Long> supportingTripIds;
|
||||
private String startH3Center;
|
||||
private String endH3Center;
|
||||
|
||||
@@ -41,6 +43,9 @@ public class MinimalDetectedRegularTripDTO {
|
||||
minimalDTO.arrivalWindowEnd = getLatestArrival(regularTrip.getSupportingTrips());
|
||||
minimalDTO.startH3Center = regularTrip.getStartH3Center();
|
||||
minimalDTO.endH3Center = regularTrip.getEndH3Center();
|
||||
minimalDTO.supportingTripIds = regularTrip.getSupportingTrips().stream()
|
||||
.map(RegularTripDetectionDTO::getTripId)
|
||||
.toList();
|
||||
return minimalDTO;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user