| | |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.pollex.pam.domain.Appointment; |
| | | import com.pollex.pam.enums.ContactStatusEnum; |
| | |
| | | import com.pollex.pam.service.mapper.AppointmentMapper; |
| | | |
| | | @Service |
| | | @Transactional |
| | | public class AppointmentService { |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | AppointmentDTOMapper appointmentDTOMapper; |
| | | |
| | | @Autowired |
| | | ConsultantService consultantService; |
| | | |
| | | |
| | | public void customerCreateAppointment(AppointmentCreateDTO appointmentCreateDTO) { |
| | |
| | | public List<Appointment> findByAgentNo(String agentNo) { |
| | | return appointmentRepository.findByAgentNo(agentNo); |
| | | } |
| | | |
| | | public void markAsContacted(Long appointmentId) { |
| | | |
| | | Appointment appointment = appointmentRepository.getById(appointmentId); |
| | | appointment.setCommunicateStatus(ContactStatusEnum.CONTACTED); |
| | | appointmentRepository.save(appointment); |
| | | } |
| | | |
| | | } |