From 41daebaa3ffd0b99aac703208e4b6b2ec41c274e Mon Sep 17 00:00:00 2001
From: 劉鈞霖 <benson@gmail.com>
Date: 星期五, 19 十一月 2021 17:44:15 +0800
Subject: [PATCH] [ Update ] 修正可複選文案,將共用 css 先拉出,調整預約顧問 背景

---
 pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 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 5932aca..e253cce 100644
--- a/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
+++ b/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
@@ -22,23 +22,22 @@
 @Service
 @Transactional
 public class AppointmentService {
-	
+
 	@Autowired
 	AppointmentRepository appointmentRepository;
-	
+
 	@Autowired
 	AppointmentDTOMapper appointmentDTOMapper;
-	
+
 	@Autowired
 	ConsultantService consultantService;
-	
+
 	@Autowired
 	AppointmentCustomerViewMapper appointmentCustomerViewMapper;
-	
+
 	@Autowired
 	AppointmentCustomerViewRepository appointmentCustomerViewRepository;
-	
-	
+
 	public void customerCreateAppointment(AppointmentCreateDTO appointmentCreateDTO) {
 		Appointment appointment = appointmentDTOMapper.toAppointment(appointmentCreateDTO);
 		appointment.setCustomerId(SecurityUtils.getCustomerId());
@@ -46,13 +45,12 @@
 		appointmentRepository.save(appointment);
 	}
 
-
 	public List<Appointment> findByAgentNo(String agentNo) {
 		return appointmentRepository.findByAgentNo(agentNo);
 	}
 
 	public void markAsContacted(Long appointmentId) {
-		
+
 		Appointment appointment = appointmentRepository.getById(appointmentId);
 		appointment.setCommunicateStatus(ContactStatusEnum.CONTACTED);
 		appointmentRepository.save(appointment);
@@ -64,5 +62,9 @@
 				.orElseThrow(AppointmentNotFoundException::new);
 		return appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointment);
 	}
-	
+
+
+    public List<Appointment> findByAgentNoAndCustomerId(String agentNo, Long customerId) {
+        return appointmentRepository.findByAgentNoAndCustomerId(agentNo, customerId);
+    }
 }

--
Gitblit v1.8.0