From 3f3e83504a3f4fe183d4769350c1470d131ff0a5 Mon Sep 17 00:00:00 2001 From: hwan2-99 Date: Wed, 19 Jun 2024 16:40:18 +0900 Subject: [PATCH] =?UTF-8?q?[refactor]=20=EC=B9=9C=EA=B5=AC=EC=9D=98=20?= =?UTF-8?q?=ED=8E=80=EB=94=A9=EC=95=84=EC=9D=B4=ED=85=9C=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95(KakaoFunding#286)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/funding/service/FundingService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/kakaoshare/backend/domain/funding/service/FundingService.java b/src/main/java/org/kakaoshare/backend/domain/funding/service/FundingService.java index 9e76b535..c674dcee 100644 --- a/src/main/java/org/kakaoshare/backend/domain/funding/service/FundingService.java +++ b/src/main/java/org/kakaoshare/backend/domain/funding/service/FundingService.java @@ -91,8 +91,12 @@ public ProgressResponse getMyFundingProgress(String providerId) { public ProgressResponse getFriendFundingProgress(String providerId, FriendFundingInquiryRequest inquiryRequest) { Member self = findMemberByProviderId(providerId); Member friend = findMemberByProviderId(inquiryRequest.getFriendProviderId()); //todo 친구 검증 메소드 추가해야함 - Funding funding = findByIdAndMemberId(inquiryRequest.getFundingId(), friend.getMemberId()); - + Funding funding = fundingRepository.findByMemberIdAndStatus(friend.getMemberId(), FundingStatus.PROGRESS) + .orElse(null); + + if (funding == null) { + return new ProgressResponse(); + } return getFundingProgress(funding.getFundingId(), friend.getMemberId()); }