MLC-331/implement the full crud operations for reservation
2 fils de conversation non résolus
2 fils de conversation non résolus
Closes MLC-331
Rapports de requête de fusion
Activité
Filtrer l'activité
assigned to @safae.rabbouzi
38 38 @Override 39 39 @Transactional 40 40 public SingleReservation createSingleReservation(SingleReservationDTO singleReservationDTO) throws FunctionalException { 41 vehicleService.getVehicleById(singleReservationDTO.getVehicleId()); 42 GlobalReservation globalReservation = globalReservationRepository.findById(singleReservationDTO.getGlobalReservationId()) 43 .orElseThrow(() -> new FunctionalException(Message.RESERVATION_NOT_FOUND + singleReservationDTO.getGlobalReservationId())); 44 SingleReservation singleReservation = singleReservationMapper.toEntity(singleReservationDTO); 45 singleReservation.setGlobalReservation(globalReservation); 46 return singleReservationRepository.save(singleReservation); 41 // vehicleService.getVehicleById(singleReservationDTO.getVehicleId()); @safae.rabbouzi please this has been reported a lot before !!
changed this line in version 2 of the diff
53 .orElseThrow(() -> new FunctionalException(Message.RESERVATION_NOT_FOUND + id)); 54 vehicleService.getVehicleById(singleReservationDTO.getVehicleId()); 55 GlobalReservation globalReservation = globalReservationRepository.findById(singleReservationDTO.getGlobalReservationId()) 56 .orElseThrow(() -> new FunctionalException(Message.RESERVATION_NOT_FOUND + singleReservationDTO.getGlobalReservationId())); 57 58 SingleReservation updatedReservation = singleReservationMapper.toEntity(singleReservationDTO); 59 60 updatedReservation.setUnitReservationId(singleReservation.getUnitReservationId()); 61 updatedReservation.setGlobalReservation(globalReservation); 62 updatedReservation.setCancellationRequests(singleReservation.getCancellationRequests()); 63 updatedReservation.setReview(singleReservation.getReview()); 64 updatedReservation.setContract(singleReservation.getContract()); 65 updatedReservation.setDeposits(singleReservation.getDeposits()); 66 67 return singleReservationRepository.save(updatedReservation); 53 // SingleReservation singleReservation = singleReservationRepository.findById(id) same here too @safae.rabbouzi please this has been reported a lot before !!
changed this line in version 2 of the diff
mentioned in commit 1278e7d5
Veuillez vous inscrire ou vous connecter pour répondre