| | |
| | | |
| | | import com.pollex.pam.domain.Appointment; |
| | | import com.pollex.pam.domain.Satisfaction; |
| | | import com.pollex.pam.enums.SatisfactionStatusEnum; |
| | | import com.pollex.pam.repository.CustomerRepository; |
| | | import com.pollex.pam.repository.SatisfactionRepository; |
| | | import com.pollex.pam.service.dto.SatisfactionCustomerCreateDTO; |
| | |
| | | @Service |
| | | @Transactional |
| | | public class SatisfactionService { |
| | | |
| | | |
| | | @Autowired |
| | | SatisfactionRepository satisfactionRepository; |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentMapper appointmentMapper; |
| | | |
| | | |
| | | @Autowired |
| | | SatisfactionDTOMapper satisfactionDTOMapper; |
| | | |
| | | |
| | | @Autowired |
| | | SatisfactionMapper satisfactionMapper; |
| | | |
| | | |
| | | @Autowired |
| | | CustomerRepository customerRepository; |
| | | |
| | | |
| | | public Satisfaction createSatisfaction(Satisfaction satisfaction) { |
| | | return satisfactionRepository.save(satisfaction); |
| | | } |
| | |
| | | List<Satisfaction> satisfactionList = satisfactionRepository.findByCustomerId(customerDBId); |
| | | return satisfactionMapper.toDTO(satisfactionList); |
| | | } |
| | | |
| | | public Optional<Satisfaction> getByAppointmentId(Long appointmentId) { |
| | | return satisfactionRepository.findOneByAppointmentId(appointmentId); |
| | | } |
| | | } |