Skip to content

Commit

Permalink
Merge pull request #77 from Donut-DONationUTile/feature/donation/rece…
Browse files Browse the repository at this point in the history
…iver

Feature/donation/receiver
  • Loading branch information
Ganghee-Lee-0522 authored Apr 30, 2024
2 parents bed5b83 + 5f67ad3 commit 78b04cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/zero/eight/donut/domain/Benefit.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ public class Benefit {
@JoinColumn(name = "receiver_id")
private Receiver receiver;

public void updateSum(Integer sum) {
this.sum = sum;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ else if (giftRepository.sumByStoreName(giftboxRequestDto.getStore().toString())
setGiftbox(assignDto, giftbox);
log.info("꾸러미에 기프티콘 할당 완료");

// 수혜 내역 업데이트
benefitOptional.get().updateSum(assignDto.getAssignedValue());

return ApiResponse.success(Success.ASSIGN_BENEFIT_SUCCESS, Map.of("giftboxId", giftbox.getId()));
}

Expand Down

0 comments on commit 78b04cc

Please sign in to comment.