| | |
| | | import com.pollex.pam.appointment.process.AppointmentProcess; |
| | | import com.pollex.pam.config.ApplicationProperties; |
| | | import com.pollex.pam.config.Constants; |
| | | import com.pollex.pam.enums.SatisfactionTypeEnum; |
| | | import com.pollex.pam.service.dto.*; |
| | | import com.pollex.pam.web.rest.errors.NotFoundExpiringAppointmentException; |
| | | import com.pollex.pam.web.rest.errors.SendEmailFailException; |
| | | import com.pollex.pam.web.rest.errors.SendSMSFailException; |
| | | import io.jsonwebtoken.lang.Assert; |
| | |
| | | } |
| | | |
| | | public void setSatisfactionScore(AppointmentCustomerViewDTO dto, Long appointmentId) { |
| | | satisfactionService.getByAppointmentId(appointmentId).ifPresent(satisfaction -> { |
| | | satisfactionService.getByAppointmentIdAndType(appointmentId, SatisfactionTypeEnum.APPOINTMENT).ifPresent(satisfaction -> { |
| | | dto.setSatisfactionScore(satisfaction.getScore()); |
| | | }); |
| | | } |
| | |
| | | public void sendAppointmentNotify(Appointment appointment) { |
| | | Assert.notNull(appointment, "appointment entity cannot be null"); |
| | | |
| | | log.debug("is need send appointment notify msg? = {}", applicationProperties.isSendNotifyMsg()); |
| | | log.debug("is need send appointment notify msg? sms = {}, email = {}", |
| | | applicationProperties.getSms().isSendNotifyMsg(), applicationProperties.getEmail().isSendNotifyMsg()); |
| | | |
| | | log.debug("sending appointment notify, appointmentId = {}", appointment.getId()); |
| | | sendAppointmentNotifyBySMS(appointment); |