From 21e0988c75045219c50ff047634a49e74f8ca2c7 Mon Sep 17 00:00:00 2001 From: eunsoni <135586807+eunsoni@users.noreply.github.com> Date: Tue, 12 Nov 2024 16:19:53 +0900 Subject: [PATCH] =?UTF-8?q?HotFix:=20=EC=8B=9C=EB=8B=88=EB=98=90=EC=9A=A9?= =?UTF-8?q?=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=EB=B3=84=20=EA=B0=80?= =?UTF-8?q?=EC=9D=B4=EB=93=9C=EB=9D=BC=EC=9D=B8=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EA=B2=80=EC=A6=9D=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?(#221)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 시니또용 카테고리별 가이드라인 조회 검증 로직 수정 --- .../guardGuideline/service/GuardGuidelineService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java b/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java index 69e9be77..cdd123bc 100644 --- a/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java +++ b/src/main/java/com/example/sinitto/guardGuideline/service/GuardGuidelineService.java @@ -61,9 +61,10 @@ public List readAllGuardGuidelinesByCategoryAndCallback( Callback callback = callbackRepository.findById(callbackId) .orElseThrow(() -> new NotFoundException("존재하지 않는 콜백입니다")); - if (callback.getStatus() != Callback.Status.WAITING.name() && callback.getAssignedMemberId() != memberId) { - throw new BadRequestException("해당 콜백은 대기 상태가 아니고, 배정 시니또가 아닙니다."); + if (!callback.getStatus().equals(Callback.Status.WAITING.name()) && !callback.getAssignedMemberId().equals(memberId)) { + throw new BadRequestException("해당 콜백은 대기 상태가 아니고, 배정된 시니또가 아닙니다."); } + Long seniorId = callback.getSeniorId(); List guardGuidelines = guardGuidelineRepository.findBySeniorIdAndType(seniorId, type);