Class AppointmentService
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.service.AppointmentService
Users related services.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AppointmentRepositoryAppointment repository.private HolidayRepositoryHoliday repository.private WorkHourRepositoryWork hour repository. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Object>checkDay(es.kukenan.smartfi.dto.backoffice.appointment.AppointmentCheckDayRequestDTO requestDto) Check working hours for a day.org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto>>getAppointment(String appointmentId) Get appointment detail.voidhandleBackOfficeAppointmentUpdatedEvent(es.kukenan.smartfi.microservice.backoffice.events.update.BackOfficeAppointmentUpdatedEvent event) Update Appointment from event.org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto>>saveAppointment(es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentRequest requestDto) Save new appointment.
-
Field Details
-
holidayRepository
Holiday repository. -
workHourRepository
Work hour repository. -
appointmentRepository
Appointment repository.
-
-
Constructor Details
-
AppointmentService
public AppointmentService()
-
-
Method Details
-
checkDay
public org.springframework.http.ResponseEntity<Object> checkDay(es.kukenan.smartfi.dto.backoffice.appointment.AppointmentCheckDayRequestDTO requestDto) Check working hours for a day.- Parameters:
requestDto- day to check- Returns:
- hours list.
-
saveAppointment
public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto>> saveAppointment(es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentRequest requestDto) Save new appointment.- Parameters:
requestDto- appointment information- Returns:
- appointment detail.
-
handleBackOfficeAppointmentUpdatedEvent
public void handleBackOfficeAppointmentUpdatedEvent(es.kukenan.smartfi.microservice.backoffice.events.update.BackOfficeAppointmentUpdatedEvent event) Update Appointment from event.- Parameters:
event- content.
-
getAppointment
public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.appointments.AppointmentDto>> getAppointment(String appointmentId) Get appointment detail.- Parameters:
appointmentId- appointment identifier- Returns:
- appointment detail.
-