Skip to content

Commit

Permalink
[Feat] 누적 위니 null일 경우 0 반환 (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
funnysunny08 authored Feb 16, 2024
1 parent b307e9c commit e46cc3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/winey/server/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public UserResponseDto getUser(Long userId) {
Long amountSpentTwoWeeks = feedRepository.getSpentAmountForPeriod(user, twoWeeksAgo);

return UserResponseDto.of(user.getUserId(), user.getNickname(),
user.getUserLevel().getName(), user.getFcmIsAllowed(), user.getSavedAmount(),
user.getUserLevel().getName(), user.getFcmIsAllowed(),
user.getSavedAmount() == null ? 0L : user.getSavedAmount(),
amountSavedHundredDays == null ? 0L : amountSavedHundredDays,
amountSavedTwoWeeks == null ? 0L : amountSavedTwoWeeks,
amountSpentTwoWeeks == null ? 0L : amountSpentTwoWeeks
Expand Down

0 comments on commit e46cc3c

Please sign in to comment.