Skip to content
Extraits de code Groupes Projets
Valider 03c7955d rédigé par safae.rabbouzi's avatar safae.rabbouzi
Parcourir les fichiers

resolve conflicts

parent 400bd1a9
Branches
1 requête de fusion!6MLC-331/implement the full crud operations for reservation
Affichage de
avec 305 ajouts et 62 suppressions
......@@ -33,7 +33,7 @@
<dependency>
<groupId>com.marketingconfort</groupId>
<artifactId>mobiloca-common</artifactId>
<version>0.0.27-RELEASE</version>
<version>0.0.29-RELEASE</version>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
......
......@@ -7,27 +7,29 @@ import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@ComponentScan(basePackages = {
"com.marketingconfort.starter.core",
"com.marketingconfort.mobiloca.*"
"com.marketingconfort.starter.core",
"com.marketingconfort.mobiloca.*"
})
@EnableJpaRepositories(basePackages = {
"com.marketingconfort.starter.core.models",
"com.marketingconfort.mobiloca.repository"
"com.marketingconfort.starter.core.models",
"com.marketingconfort.mobiloca.repository"
})
@EntityScan(basePackages = {
"com.marketingconfort.starter.core",
"com.marketingconfort.mobiloca.common.Reservation.models"
"com.marketingconfort.starter.core",
"com.marketingconfort.mobiloca.common.Reservation.models"
})
@EnableScheduling
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
package com.marketingconfort.mobiloca.config;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class CorsConfig {
@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(@NotNull CorsRegistry registry) {
}
};
}
}
......@@ -3,5 +3,13 @@ package com.marketingconfort.mobiloca.constants;
public class Message {
public static final String CONTRACT_NOT_FOUND = "Contract not found";
public static final String RESERVATION_NOT_FOUND = "Reservation not found with ID: ";
public static final String CLIENT_FAILED_TO_GET = "Failed to get client with ID: ";
public static final String AGENCY_NOT_FOUND = "Agency not found with ID: ";
public static final String TECHNICAL_ERROR = "An unexpected error occurred. Please try again later.";
public static final String VEHICLE_NOT_FOUND = "Vehicle not found with ID: ";
public static final String RETUREN_DATE_BEFORE_PICKUP_DATE = "Return date cannot be before pickup date.";
public static final String NON_VALID_EQUIPMENT_ID = "Non valid equipment ID: ";
public static final String RESERVATION_SET_TO_CONFIRMED = "Reservation set to confirmed with ID: ";
public static final String RESERVATION_SET_TO_COMPLETED = "Reservation set to completed with ID: ";
public static final String AGENCY_SERVICE_ERROR = "Error occurred while calling agency service: ";
}
......@@ -10,8 +10,13 @@ public class Paths {
public static final String GLOBAL_RESERVATION_BASE = BASE_URL + "/global-reservation";
public static final String SINGLE_RESERVATION_BASE = BASE_URL + "/single-reservation";
public static final String ALL_RESERVATIONS = "/all";
public static final String CREATE_RESERVATION = "";
public static final String UPDATE_RESERVATION = "/{id}";
public static final String RESERVATION_BY_ID = "/{id}";
public static final String RESERVATIONS = "";
public static final String DELETE_RESERVATION = "/{id}";
public static final String RUN_SCHEDULER = "/run-manual";
public static final String ALL_RESERVATIONS = "/all";
public static final String RESERVATIONS_BY_CLIENT = "/client/{clientId}";
public static final String RESERVATION_BY_NUMBER = "/number/{reservationNumber}";
public static final String RESERVATIONS_BY_TYPE = "/type/{type}";
......@@ -29,5 +34,8 @@ public class Paths {
public static final String CHECK_AVAILABILITY = "/check-availability";
public static final String RESERVATION_TOTAL_COST = "/{id}/total-cost";
public static final String RESERVATION_DETAILS = "/{id}/details";
// ========Agency Api========
public static final String GET_AGENCY_NAME_BY_ID = "/{id}/name";
}
package com.marketingconfort.mobiloca.controller;
import com.marketingconfort.mobiloca.common.Reservation.enums.ReservationType;
import com.marketingconfort.mobiloca.common.Reservation.enums.SingleReservationStatus;
import com.marketingconfort.mobiloca.common.Reservation.models.GlobalReservation;
import com.marketingconfort.mobiloca.common.Reservation.models.SingleReservation;
import com.marketingconfort.mobiloca.constants.Paths;
......@@ -10,10 +9,11 @@ import com.marketingconfort.mobiloca.dto.SingleReservationDTO;
import com.marketingconfort.mobiloca.mapper.GlobalReservationMapper;
import com.marketingconfort.mobiloca.mapper.SingleReservationMapper;
import com.marketingconfort.mobiloca.service.GlobalReservationService;
import com.marketingconfort.mobiloca.service.SingleReservationService;
import com.marketingconfort.mobiloca.utils.ReservationStatusScheduler;
import com.marketingconfort.starter.core.exceptions.FunctionalException;
import lombok.RequiredArgsConstructor;
import org.modelmapper.ModelMapper;
import org.springframework.data.domain.Page;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
......@@ -28,6 +28,61 @@ import java.util.stream.Collectors;
public class GlobalReservationController {
private final GlobalReservationService globalReservationService;
private final GlobalReservationMapper globalReservationMapper;
private final ReservationStatusScheduler scheduler;
@PostMapping(Paths.CREATE_RESERVATION)
public ResponseEntity<GlobalReservationDTO> createGlobalReservation(@RequestBody GlobalReservationDTO globalReservationDTO) throws FunctionalException {
GlobalReservationDTO globalReservationDto = globalReservationService.createReservation(globalReservationDTO);
return ResponseEntity.ok(globalReservationDto);
}
@PutMapping(Paths.UPDATE_RESERVATION)
public ResponseEntity<GlobalReservationDTO> updateReservation(
@PathVariable Long id,
@RequestBody GlobalReservationDTO request) throws FunctionalException {
GlobalReservationDTO updated = globalReservationService.updateReservation(id, request);
return ResponseEntity.ok(updated);
}
@GetMapping(Paths.RESERVATION_BY_ID)
public ResponseEntity<GlobalReservationDTO> getReservationById(@PathVariable Long id) throws FunctionalException {
GlobalReservationDTO dto = globalReservationService.getReservationById(id);
return ResponseEntity.ok(dto);
}
@GetMapping(Paths.RESERVATIONS)
public ResponseEntity<Page<GlobalReservationDTO>> getAllReservations(
@RequestParam(defaultValue = "0") int page,
@RequestParam(defaultValue = "10") int size,
@RequestParam(defaultValue = "createdAt") String sortBy,
@RequestParam(defaultValue = "DESC") String sortDirection,
@RequestParam(required = false) String reservationNumberSearch,
@RequestParam(required = false) String clientSearch,
@RequestParam(required = false) String typeSearch,
@RequestParam(required = false) String vehicleSearch
) throws FunctionalException {
Page<GlobalReservationDTO> result = globalReservationService.getAllReservations(
page, size, sortBy, sortDirection,
reservationNumberSearch,
clientSearch,
typeSearch,
vehicleSearch
);
return ResponseEntity.ok(result);
}
@DeleteMapping(Paths.DELETE_RESERVATION)
public ResponseEntity<Void> deleteReservation(@PathVariable Long id) throws FunctionalException {
globalReservationService.deleteReservation(id);
return ResponseEntity.noContent().build();
}
@PostMapping(Paths.RUN_SCHEDULER)
public String manuallyRunStatusUpdate() {
scheduler.updateReservationStatuses();
return "Status update executed successfully.";
}
@GetMapping(Paths.ALL_RESERVATIONS)
public ResponseEntity<List<GlobalReservationDTO>> getAllGlobalReservations() {
......@@ -38,12 +93,6 @@ public class GlobalReservationController {
return ResponseEntity.ok(reservations);
}
@GetMapping(Paths.RESERVATION_BY_ID)
public ResponseEntity<GlobalReservationDTO> getGlobalReservationById(@PathVariable Long id) throws FunctionalException {
return ResponseEntity.ok(globalReservationMapper.toDto(
globalReservationService.getGlobalReservationById(id).orElseThrow()));
}
@GetMapping(Paths.RESERVATIONS_BY_CLIENT)
public ResponseEntity<List<GlobalReservationDTO>> getReservationsByClientId(@PathVariable Long clientId) {
List<GlobalReservationDTO> reservations = globalReservationService.getReservationsByClientId(clientId)
......@@ -79,19 +128,6 @@ public class GlobalReservationController {
return ResponseEntity.ok(reservations);
}
@PostMapping(Paths.ALL_RESERVATIONS)
public ResponseEntity<GlobalReservationDTO> createGlobalReservation(@RequestBody GlobalReservationDTO globalReservationDTO) throws FunctionalException {
GlobalReservation globalReservation = globalReservationService.createGlobalReservation(globalReservationDTO);
return ResponseEntity.ok(globalReservationMapper.toDto(globalReservation));
}
@PostMapping(Paths.RESERVATION_BY_ID)
public ResponseEntity<GlobalReservationDTO> updateGlobalReservation(
@PathVariable Long id, @RequestBody GlobalReservationDTO globalReservationDTO) throws FunctionalException {
GlobalReservation globalReservation = globalReservationService.updateGlobalReservation(id, globalReservationDTO);
return ResponseEntity.ok(globalReservationMapper.toDto(globalReservation));
}
@PostMapping(Paths.CHANGE_RESERVATION_TYPE)
public ResponseEntity<GlobalReservationDTO> changeReservationType(
@PathVariable Long id, @RequestParam ReservationType type) throws FunctionalException {
......@@ -107,12 +143,6 @@ public class GlobalReservationController {
return ResponseEntity.ok(globalReservationMapper.toDto(globalReservation));
}
@PostMapping(Paths.RESERVATION_BY_ID + "/delete")
public ResponseEntity<Void> deleteGlobalReservation(@PathVariable Long id) throws FunctionalException {
globalReservationService.deleteGlobalReservation(id);
return ResponseEntity.noContent().build();
}
@GetMapping(Paths.RESERVATION_TOTAL)
public ResponseEntity<Double> calculateTotalPaid(@PathVariable Long id) throws FunctionalException {
return ResponseEntity.ok(globalReservationService.calculateTotalPaid(id));
......
package com.marketingconfort.mobiloca.dto;
import com.marketingconfort.mobiloca.common.Reservation.dto.ClientDTO;
import com.marketingconfort.mobiloca.common.Reservation.enums.ReservationType;
import lombok.AllArgsConstructor;
import lombok.Getter;
......@@ -16,9 +17,11 @@ import java.util.List;
public class GlobalReservationDTO {
private Long id;
private String reservationNumber;
private Long clientId;
private ClientDTO client;
private LocalDate createdAt;
private ReservationType type;
private Double totalAmount;
private Double totalPaid;
private Double totalRemaining;
private List<SingleReservationDTO> singleReservations;
}
package com.marketingconfort.mobiloca.dto;
import com.marketingconfort.mobiloca.common.Reservation.dto.BuiltInEquipmentDTO;
import com.marketingconfort.mobiloca.common.Reservation.enums.PaymentMode;
import com.marketingconfort.mobiloca.common.Reservation.enums.SingleReservationStatus;
import com.marketingconfort.mobiloca.common.User.dtos.AgencyDTO;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.time.LocalDate;
import java.util.List;
@Getter
@Setter
......@@ -15,12 +19,20 @@ import java.time.LocalDate;
public class SingleReservationDTO {
private Long unitReservationId;
private String reservationNumber;
private Long vehicleId;
private VehicleDTO vehicle;
private LocalDate pickupDate;
private LocalDate returnDate;
private Long departureAgency;
private Long returnAgency;
private AgencyDTO departureAgency;
private AgencyDTO returnAgency;
private Boolean insurance;
private SingleReservationStatus status;
private Long globalReservationId;
private PaymentMode paymentMode;
private Double amountPaid;
private Double remainingAmount;
private LocalDate paymentDate;
private List<BuiltInEquipmentDTO> builtInEquipments;
}
......@@ -15,5 +15,5 @@ public class VehicleDTO {
private String brand;
private String model;
private String registration;
private Double pricePerDay;
}
package com.marketingconfort.mobiloca.externalServices;
import com.marketingconfort.mobiloca.common.User.dtos.AgencyDTO;
import com.marketingconfort.starter.core.exceptions.FunctionalException;
public interface AgencyService {
AgencyDTO getAgencyById(Long agencyId) throws FunctionalException;
}
package com.marketingconfort.mobiloca.service;
import com.marketingconfort.mobiloca.dto.ClientDTO;
public interface ClientService {
ClientDTO getClientById(Long id);
}
package com.marketingconfort.mobiloca.externalServices;
import com.marketingconfort.mobiloca.dto.ClientDTO;
public interface ClientService {
ClientDTO getClientById(Long id);
com.marketingconfort.mobiloca.common.Reservation.dto.ClientDTO getClient(Long id);
}
package com.marketingconfort.mobiloca.externalServices.Implementations;
import com.marketingconfort.mobiloca.common.User.dtos.AgencyDTO;
import com.marketingconfort.mobiloca.constants.Message;
import com.marketingconfort.mobiloca.constants.Paths;
import com.marketingconfort.mobiloca.externalServices.AgencyService;
import com.marketingconfort.starter.core.exceptions.FunctionalException;
import com.marketingconfort.starter.core.services.MCRestTemplateService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.HttpClientErrorException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Service
@RequiredArgsConstructor
public class AgencyServiceImpl implements AgencyService {
private static final Logger log = LoggerFactory.getLogger(AgencyServiceImpl.class);
private final MCRestTemplateService mcRestTemplateService;
@Value("${agency.service.url}")
private String agencyServiceUrl;
@Override
public AgencyDTO getAgencyById(Long agencyId) throws FunctionalException {
try {
String url = agencyServiceUrl + Paths.GET_AGENCY_NAME_BY_ID.replace("{id}", String.valueOf(agencyId));
ResponseEntity<AgencyDTO> response = mcRestTemplateService.getForObject(url, AgencyDTO.class);
if (response.getStatusCode().is2xxSuccessful()) {
return response.getBody();
} else {
log.warn(Message.AGENCY_SERVICE_ERROR, response.getStatusCode());
throw new FunctionalException(String.format(Message.AGENCY_NOT_FOUND, agencyId));
}
} catch (HttpClientErrorException.NotFound e) {
log.warn(Message.AGENCY_NOT_FOUND, agencyId);
throw new FunctionalException(String.format(Message.AGENCY_NOT_FOUND, agencyId));
} catch (Exception e) {
log.error(Message.AGENCY_SERVICE_ERROR, agencyId, e.getMessage());
throw new FunctionalException(Message.TECHNICAL_ERROR);
}
}
}
package com.marketingconfort.mobiloca.service.impl;
import com.marketingconfort.mobiloca.dto.ClientDTO;
import com.marketingconfort.mobiloca.service.ClientService;
import com.marketingconfort.starter.core.services.MCRestTemplateService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public class ClientServiceImpl implements ClientService {
private final MCRestTemplateService mcRestTemplateService;
@Value("${external.user.service.url}")
private String clientServiceUrl;
@Override
public ClientDTO getClientById(Long id) {
try {
String url = clientServiceUrl + "/" + id;
ResponseEntity<ClientDTO> response = mcRestTemplateService.getForObject(url, ClientDTO.class);
return response.getBody();
} catch (Exception e) {
log.error("Failed to fetch client with id {}", id, e);
return null;
}
}
}
package com.marketingconfort.mobiloca.externalServices.Implementations;
import com.marketingconfort.mobiloca.constants.Message;
import com.marketingconfort.mobiloca.dto.ClientDTO;
import com.marketingconfort.mobiloca.externalServices.ClientService;
import com.marketingconfort.starter.core.services.MCRestTemplateService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@RequiredArgsConstructor
public class ClientServiceImpl implements ClientService {
private final MCRestTemplateService mcRestTemplateService;
@Value("${user.service.url}")
private String clientServiceUrl;
@Override
public ClientDTO getClientById(Long id) {
try {
String url = clientServiceUrl + "/" + id;
ResponseEntity<ClientDTO> response = mcRestTemplateService.getForObject(url, ClientDTO.class);
return response.getBody();
} catch (Exception e) {
log.error(Message.CLIENT_FAILED_TO_GET, id, e);
return null;
}
}
@Override
public com.marketingconfort.mobiloca.common.Reservation.dto.ClientDTO getClient(Long clientId) {
try {
String url = clientServiceUrl + "/clients/by-id/" + clientId;
ResponseEntity<com.marketingconfort.mobiloca.common.Reservation.dto.ClientDTO> response = mcRestTemplateService.getForObject(url, com.marketingconfort.mobiloca.common.Reservation.dto.ClientDTO.class);
return response.getBody();
} catch (Exception e) {
LoggerFactory.getLogger(getClass()).warn(Message.CLIENT_FAILED_TO_GET + " : {}", clientId, e);
return null;
}
}
}
package com.marketingconfort.mobiloca.service.impl;
package com.marketingconfort.mobiloca.externalServices.Implementations;
import com.marketingconfort.mobiloca.common.Vehicle.models.Vehicle;
import com.marketingconfort.mobiloca.common.Reservation.dto.BuiltInEquipmentDTO;
import com.marketingconfort.mobiloca.constants.Message;
import com.marketingconfort.mobiloca.dto.VehicleDTO;
import com.marketingconfort.mobiloca.service.VehicleService;
import com.marketingconfort.mobiloca.externalServices.VehicleService;
import com.marketingconfort.starter.core.services.MCRestTemplateService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......@@ -17,7 +18,7 @@ public class VehicleServiceImpl implements VehicleService {
private final MCRestTemplateService mcRestTemplateService;
@Value("${external.vehicle.service.url}")
@Value("${vehicle.service.url}")
private String vehicleServiceUrl;
@Override
......@@ -27,7 +28,19 @@ public class VehicleServiceImpl implements VehicleService {
ResponseEntity<VehicleDTO> response = mcRestTemplateService.getForObject(url, VehicleDTO.class);
return response.getBody();
} catch (Exception e) {
log.error("Failed to fetch vehicle with id {}", id, e);
log.error(Message.VEHICLE_NOT_FOUND, id, e);
return null;
}
}
@Override
public BuiltInEquipmentDTO getEquipmentById(Long id) {
try {
String url = vehicleServiceUrl + "/equipment/" + id;
ResponseEntity<BuiltInEquipmentDTO> response = mcRestTemplateService.getForObject(url, BuiltInEquipmentDTO.class);
return response.getBody();
} catch (Exception e) {
log.error(Message.NON_VALID_EQUIPMENT_ID, id, e);
return null;
}
}
......
package com.marketingconfort.mobiloca.service;
import com.marketingconfort.mobiloca.dto.VehicleDTO;
public interface VehicleService {
VehicleDTO getVehicleById(Long id);
}
package com.marketingconfort.mobiloca.externalServices;
import com.marketingconfort.mobiloca.common.Reservation.dto.BuiltInEquipmentDTO;
import com.marketingconfort.mobiloca.dto.VehicleDTO;
public interface VehicleService {
VehicleDTO getVehicleById(Long id);
BuiltInEquipmentDTO getEquipmentById(Long id);
}
package com.marketingconfort.mobiloca.mapper;
public class ReservationMapper {
}
......@@ -3,15 +3,19 @@ package com.marketingconfort.mobiloca.repository;
import com.marketingconfort.mobiloca.common.Reservation.enums.ReservationType;
import com.marketingconfort.mobiloca.common.Reservation.models.GlobalReservation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
import java.time.LocalDate;
import java.util.List;
@Repository
public interface GlobalReservationRepository extends JpaRepository<GlobalReservation, Long> {
public interface GlobalReservationRepository extends JpaRepository<GlobalReservation, Long>, JpaSpecificationExecutor<GlobalReservation> {
List<GlobalReservation> findByClientId(Long clientId);
GlobalReservation findByReservationNumber(String reservationNumber);
List<GlobalReservation> findByType(ReservationType type);
List<GlobalReservation> findByCreatedAtBetween(LocalDate startDate, LocalDate endDate);
}
\ No newline at end of file
......@@ -11,7 +11,15 @@ import java.util.List;
@Repository
public interface SingleReservationRepository extends JpaRepository<SingleReservation, Long> {
List<SingleReservation> findByVehicleId(Long vehicleId);
List<SingleReservation> findByPickupDateBetween(LocalDate startDate, LocalDate endDate);
List<SingleReservation> findByStatus(SingleReservationStatus status);
List<SingleReservation> findByDepartureAgencyAndReturnAgency(Long departureAgency, Long returnAgency);
List<SingleReservation> findByDepartureAgencyIdAndReturnAgencyId(Long departureAgencyId, Long returnAgencyId);
List<SingleReservation> findByPickupDateAndStatus(LocalDate pickupDate, SingleReservationStatus status);
List<SingleReservation> findByReturnDateAndStatus(LocalDate returnDate, SingleReservationStatus status);
}
\ No newline at end of file
......@@ -5,17 +5,34 @@ import com.marketingconfort.mobiloca.common.Reservation.models.GlobalReservation
import com.marketingconfort.mobiloca.common.Reservation.models.SingleReservation;
import com.marketingconfort.mobiloca.dto.GlobalReservationDTO;
import com.marketingconfort.starter.core.exceptions.FunctionalException;
import org.springframework.data.domain.Page;
import java.time.LocalDate;
import java.util.List;
import java.util.Optional;
public interface GlobalReservationService {
GlobalReservation createGlobalReservation(GlobalReservationDTO globalReservationDTO) throws FunctionalException;
GlobalReservation updateGlobalReservation(Long id, GlobalReservationDTO globalReservationDTO) throws FunctionalException;
void deleteGlobalReservation(Long id) throws FunctionalException;
GlobalReservationDTO createReservation(GlobalReservationDTO request) throws FunctionalException;
GlobalReservationDTO updateReservation(Long id, GlobalReservationDTO request) throws FunctionalException;
GlobalReservationDTO getReservationById(Long id) throws FunctionalException;
Page<GlobalReservationDTO> getAllReservations(
int page,
int size,
String sortBy,
String sortDirection,
String reservationNumberSearch,
String clientSearch,
String typeSearch,
String vehicleSearch
) throws FunctionalException;
void deleteReservation(Long id) throws FunctionalException;
List<GlobalReservation> getAllGlobalReservations();
Optional<GlobalReservation> getGlobalReservationById(Long id) throws FunctionalException;
GlobalReservation changeReservationType(Long id, ReservationType type) throws FunctionalException;
List<GlobalReservation> getReservationsByClientId(Long clientId);
List<GlobalReservation> getReservationsByType(ReservationType type);
......
......@@ -9,9 +9,9 @@ import com.marketingconfort.mobiloca.dto.VehicleDTO;
import com.marketingconfort.mobiloca.common.Reservation.models.Contract;
import com.marketingconfort.mobiloca.mapper.ContractMapper;
import com.marketingconfort.mobiloca.repository.ContractRepository;
import com.marketingconfort.mobiloca.service.ClientService;
import com.marketingconfort.mobiloca.externalServices.ClientService;
import com.marketingconfort.mobiloca.service.ContractService;
import com.marketingconfort.mobiloca.service.VehicleService;
import com.marketingconfort.mobiloca.externalServices.VehicleService;
import com.marketingconfort.starter.core.exceptions.FunctionalException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter