From e42dde72c5cd6ca57d6fa720a17fa4bc229c42cd Mon Sep 17 00:00:00 2001
From: wayne <wayne8692wayne8692@gmail.com>
Date: 星期二, 08 二月 2022 14:06:36 +0800
Subject: [PATCH] [update] 修正填寫滿意度的規格,並修正appointmentId現在不為唯一導致有搜尋的問題

---
 pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java |    4 ++--
 1 files changed, 2 insertions(+), 2 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 3ae99c4..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());
         });
     }

--
Gitblit v1.8.0