From 059d482703b3cd51c2ca0e36bf4c2c602bfa4e48 Mon Sep 17 00:00:00 2001 From: dongkyeomjang Date: Sat, 23 Nov 2024 16:24:22 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20BugFix/#92=20-=20=EC=98=A8?= =?UTF-8?q?=EA=B8=B0=20=EC=83=81=EC=84=B8=20=EC=A1=B0=ED=9A=8C=EC=97=90?= =?UTF-8?q?=EC=84=9C=20BankUtil=EC=97=90=20=EC=A1=B0=ED=9A=8C=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=20=EB=B3=B4=EB=82=BC=20=EC=8B=9C=20bankId=20=EB=8C=80?= =?UTF-8?q?=EC=8B=A0=20storeId=EB=A5=BC=20=EB=B3=B4=EB=82=B4=EA=B3=A0?= =?UTF-8?q?=EC=9E=88=EB=8D=98=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/service/ReadStoreDetailService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/daon/onjung/account/application/service/ReadStoreDetailService.java b/src/main/java/com/daon/onjung/account/application/service/ReadStoreDetailService.java index ea90a91..cf42ac5 100644 --- a/src/main/java/com/daon/onjung/account/application/service/ReadStoreDetailService.java +++ b/src/main/java/com/daon/onjung/account/application/service/ReadStoreDetailService.java @@ -51,11 +51,11 @@ public ReadStoreDetailResponseDto execute(Long id) { ReadStoreDetailResponseDto.StoreInfoDto storeInfoDto = ReadStoreDetailResponseDto.StoreInfoDto.fromEntity(store); // event 정보 - Integer totalAmount = getTotalAmount(id); + Integer totalAmount = getTotalAmount(event.getBankId()); ReadStoreDetailResponseDto.EventInfoDto eventInfoDto = ReadStoreDetailResponseDto.EventInfoDto.of(totalAmount, eventService.getRestOfDate(event)); - // onjung 정보 (null 값 대신 0으로 + // onjung 정보 (null 값 대신 0으로) Integer totalOnjungCount = Optional.ofNullable(storeRepository.countUsersByStoreId(id)).orElse(0); Integer totalDonationAmount = Optional.ofNullable(storeRepository.sumDonationAmountByStoreId(id)).orElse(0); Integer totalReceiptAmount = Optional.ofNullable(storeRepository.sumReceiptAmountByStoreId(id)).orElse(0); @@ -96,8 +96,8 @@ public ReadStoreDetailResponseDto execute(Long id) { } // bank api 호출 - private Integer getTotalAmount(Long storeId) { - String url = bankUtil.createReadVirtualAccountRequestUrl(storeId); + private Integer getTotalAmount(Long eventId) { + String url = bankUtil.createReadVirtualAccountRequestUrl(eventId); HttpHeaders headers = bankUtil.createVirtualAccountRequestHeaders();