From 2f0e71d3d73b71cba5a0caebfdb9ba79722989c0 Mon Sep 17 00:00:00 2001
From: wayne <wayne8692wayne8692@gmail.com>
Date: 星期四, 27 一月 2022 14:54:38 +0800
Subject: [PATCH] [update] [todo 134826, 134662] 調整顧問資料格式、棄用搜尋並改將其功能改到前端算匹配度

---
 pamapi/src/main/java/com/pollex/pam/service/SatisfactionService.java |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/pamapi/src/main/java/com/pollex/pam/service/SatisfactionService.java b/pamapi/src/main/java/com/pollex/pam/service/SatisfactionService.java
index 569844e..9911f04 100644
--- a/pamapi/src/main/java/com/pollex/pam/service/SatisfactionService.java
+++ b/pamapi/src/main/java/com/pollex/pam/service/SatisfactionService.java
@@ -40,13 +40,13 @@
 
 	@Autowired
 	CustomerRepository customerRepository;
-	
+
 	@Autowired
 	ConsultantRepository consultantRepository;
-	
+
 	@Autowired
 	ConsultantService consultantService;
-	
+
 	@Autowired
 	PersonalNotificationService personalNotificationService;
 
@@ -55,7 +55,7 @@
 		consultantService.setConsultantAvgScore(satisfaction);
 		return satisfaction;
 	}
-	
+
 	public Satisfaction scorefaction(SatisfactionCustomerScoreDTO scoreDTO) {
 		Optional<Satisfaction> satisfactionOP = getByAppointmentId(scoreDTO.getAppointmentId());
 		Satisfaction satisfaction = satisfactionOP.orElseThrow(SatisfactionNotFoundException::new);
@@ -65,7 +65,7 @@
 		personalNotificationService.createScorefactionToConsultant(satisfaction);
 		return satisfaction;
 	}
-	
+
 	public Satisfaction createSatisfaction(Appointment appointment) {
 		boolean isexist = getByAppointmentId(appointment.getId()).isPresent();
 		if(isexist) {
@@ -94,6 +94,10 @@
         return satisfactionRepository.findOneByAppointmentId(appointmentId);
     }
 
+    public List<Satisfaction> getByStatus(SatisfactionStatusEnum status) {
+        return satisfactionRepository.findAllByStatus(status);
+    }
+
 	public List<Satisfaction> scoreAllfaction(List<SatisfactionCustomerScoreDTO> scoreDTO) {
 		List<Satisfaction> satisfactionList = new ArrayList<>();
 		scoreDTO.stream().forEach(dto ->{

--
Gitblit v1.8.0