| | |
| | | @Service |
| | | @Transactional |
| | | public class AppointmentService { |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentRepository appointmentRepository; |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentDTOMapper appointmentDTOMapper; |
| | | |
| | |
| | | appointmentRepository.save(appointment); |
| | | } |
| | | |
| | | |
| | | public List<Appointment> findByAgentNo(String agentNo) { |
| | | return appointmentRepository.findByAgentNo(agentNo); |
| | | } |
| | |
| | | return appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointment); |
| | | } |
| | | |
| | | |
| | | public List<Appointment> findByAgentNoAndCustomerId(String agentNo, Long customerId) { |
| | | return appointmentRepository.findByAgentNoAndCustomerId(agentNo, customerId); |
| | | } |
| | | } |