From 743dc92e364e48ffc9c23139f14a7d7c18ba3744 Mon Sep 17 00:00:00 2001 From: HyungJu Date: Sat, 18 May 2024 15:10:28 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EB=B0=B1?= =?UTF-8?q?=EC=8B=A0=20=EC=A7=80=EA=B8=89=EC=9D=84=20=EB=8B=89=EB=84=A4?= =?UTF-8?q?=EC=9E=84=EC=9C=BC=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/inoculation/application/InoculationService.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/vacgom/backend/inoculation/application/InoculationService.kt b/src/main/kotlin/com/vacgom/backend/inoculation/application/InoculationService.kt index 673c396..2c9f4de 100644 --- a/src/main/kotlin/com/vacgom/backend/inoculation/application/InoculationService.kt +++ b/src/main/kotlin/com/vacgom/backend/inoculation/application/InoculationService.kt @@ -13,6 +13,7 @@ import com.vacgom.backend.inoculation.infrastructure.persistence.InoculationRepo import com.vacgom.backend.inoculation.infrastructure.persistence.VaccinationRepository import com.vacgom.backend.inoculation.presentation.dto.EventVaccinationRequest import com.vacgom.backend.inoculation.presentation.dto.InoculationSimpleRequest +import com.vacgom.backend.member.domain.Nickname import com.vacgom.backend.member.infrastructure.persistence.MemberRepository import com.vacgom.backend.notification.application.NotificationService import jakarta.transaction.Transactional @@ -174,9 +175,9 @@ class InoculationService( fun addEventInoculation(eventVaccinationRequest: EventVaccinationRequest) { val member = - memberRepository.findById(UUID.fromString(eventVaccinationRequest.userId)) - .orElseThrow { BusinessException(GlobalError.GLOBAL_NOT_FOUND) } - + memberRepository.findMemberByNickname( + Nickname(eventVaccinationRequest.userId), + ) ?: throw BusinessException(GlobalError.GLOBAL_NOT_FOUND) val eventVaccination = vaccinationRepository.findById(UUID.fromString("3e1065ab-e785-11ee-9d8f-0e9be882b70f")) .orElseThrow { BusinessException(GlobalError.GLOBAL_NOT_FOUND) }