Skip to content

adapt mapper and specifications to support separated driver first/last name

yassine sabir a demandé de fusionner feature/Split-Name vers develop

Update GeolocMapper and GeolocSpecifications to work with the new GeolocData entity structure where driverName has been split into driverFirstName and driverLastName fields.

Changes:

  • GeolocMapper.toDTO(): Build driverName by concatenating driverFirstName and driverLastName from entity instead of using removed driverName field
  • GeolocMapper.toDetailsDTO(): Apply same concatenation logic for detailed response DTO
  • GeolocMapper: Add private buildDriverName() helper method to handle null cases when concatenating first and last name
  • GeolocSpecifications.hasDriverName(): Update search to query both driverFirstName and driverLastName fields using OR condition instead of single driverName field

Impact:

  • API responses remain unchanged (still return driverName)
  • Search functionality improved (can match by either first or last name)
  • Better null handling for incomplete driver information
  • No breaking changes for frontend or API consumers

Rapports de requête de fusion