| | |
| | | |
| | | @Autowired |
| | | AppointmentCustomerViewRepository appointmentCustomerViewRepository; |
| | | |
| | | @Autowired |
| | | SatisfactionService satisfactionService; |
| | | |
| | | public void customerCreateAppointment(AppointmentCreateDTO appointmentCreateDTO) { |
| | | Appointment appointment = appointmentDTOMapper.toAppointment(appointmentCreateDTO); |
| | | appointment.setCustomerId(SecurityUtils.getCustomerDBId()); |
| | | appointment.setCommunicateStatus(ContactStatusEnum.RESERVED); |
| | | appointmentRepository.save(appointment); |
| | | |
| | | } |
| | | |
| | | public List<Appointment> findByAgentNo(String agentNo) { |
| | | return appointmentRepository.findByAgentNo(agentNo); |
| | | } |
| | | |
| | | public void markAsContacted(Long appointmentId) { |
| | | public Appointment markAsContacted(Long appointmentId) { |
| | | |
| | | Appointment appointment = appointmentRepository.findById(appointmentId).get(); |
| | | appointment.setCommunicateStatus(ContactStatusEnum.CONTACTED); |
| | | appointmentRepository.save(appointment); |
| | | return appointmentRepository.save(appointment); |
| | | } |
| | | |
| | | |