From fa782dca2a00e9a4a48c5b3588f5eb3b47af93cf Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期二, 01 三月 2022 15:41:05 +0800 Subject: [PATCH] [update] [todo 136031] 諮詢度表現,提供前端該顧問所有預約單數量以及近一個月的預約單數量 --- pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java b/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java index dbed395..9931a44 100644 --- a/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java +++ b/pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java @@ -1,10 +1,22 @@ package com.pollex.pam.service; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; + +import com.pollex.pam.domain.AppointmentClosedInfo; +import com.pollex.pam.repository.AppointmentClosedInfoRepository; +import com.pollex.pam.web.rest.errors.AppointmentClosedInfoNotFoundException; @Service @Transactional public class AppointmentClosedInfoService { - + + @Autowired + AppointmentClosedInfoRepository appointmentClosedInfoRepository; + + public AppointmentClosedInfo findByAppointmentId(Long apId) { + return appointmentClosedInfoRepository.findByAppointmentId(apId) + .orElseThrow(AppointmentClosedInfoNotFoundException::new); + } } -- Gitblit v1.8.0