Skip to content

Commit

Permalink
🐞 BugFix/#92 - 온기 상세 조회에서 BankUtil에 조회요청 보낼 시 bankId 대신 storeId를 보내고있…
Browse files Browse the repository at this point in the history
…던 버그 수정
  • Loading branch information
dongkyeomjang committed Nov 23, 2024
1 parent a46e837 commit 059d482
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 059d482

Please sign in to comment.