From 06d3a2b2801ecaaa60a3427a70a8179164ffedb9 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期三, 16 二月 2022 16:44:38 +0800
Subject: [PATCH] Merge branch 'Phase3' of https://dev.pollex.com.tw:8443/r/pcalife/PAM into Phase3

---
 pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java b/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
index 6d5ded6..fe55f38 100644
--- a/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
+++ b/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
@@ -12,8 +12,8 @@
 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;
@@ -159,7 +159,7 @@
     }
 
     public void setSatisfactionScore(AppointmentCustomerViewDTO dto, Long appointmentId) {
-        satisfactionService.getByAppointmentId(appointmentId).ifPresent(satisfaction -> {
+        satisfactionService.getByAppointmentIdAndType(appointmentId, SatisfactionTypeEnum.APPOINTMENT).ifPresent(satisfaction -> {
             dto.setSatisfactionScore(satisfaction.getScore());
         });
     }
@@ -200,7 +200,8 @@
     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);

--
Gitblit v1.8.0