Skip to content

Commit

Permalink
Merge pull request #233 from team-winey/refactor/#232
Browse files Browse the repository at this point in the history
[Refactor]#232 μ ˆμ•½ λˆ„μ νšŸμˆ˜ μΆ”κ°€
  • Loading branch information
sss4920 authored Feb 22, 2024
2 parents 45ec08e + 403d971 commit c29a4f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static class UserData {
private String userLevel;
private Boolean fcmIsAllowed;
private Long accumulatedAmount;
private Long accumulatedCount;
private Long amountSavedHundredDays;
private Long amountSavedTwoWeeks;
private Long amountSpentTwoWeeks;
Expand All @@ -33,9 +34,9 @@ public static class UserData {


public static UserResponseDto of(Long userId, String nickname, String userLevel,
Boolean fcmIsAllowed, Long accumulatedAmount, Long amountSavedHundredDays, Long amountSavedTwoWeeks,
Boolean fcmIsAllowed, Long accumulatedAmount,Long accumulatedCount , Long amountSavedHundredDays, Long amountSavedTwoWeeks,
Long amountSpentTwoWeeks, Long remainingAmount, Long remainingCount) {
UserData userData = new UserData(userId, nickname, userLevel, fcmIsAllowed, accumulatedAmount,
UserData userData = new UserData(userId, nickname, userLevel, fcmIsAllowed, accumulatedAmount, accumulatedCount,
amountSavedHundredDays, amountSavedTwoWeeks, amountSpentTwoWeeks,remainingAmount,remainingCount);
return new UserResponseDto(userData);
}
Expand Down
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 @@ -46,7 +46,8 @@ public UserResponseDto getUser(Long userId) {
return UserResponseDto.of(user.getUserId(), user.getNickname(),
user.getUserLevel().getName(),
user.getFcmIsAllowed(),
user.getSavedAmount() == null ? 0L : user.getSavedAmount(),
savedAmountOfUser,
savedCountOfUser,
amountSavedHundredDays == null ? 0L : amountSavedHundredDays,
amountSavedTwoWeeks == null ? 0L : amountSavedTwoWeeks,
amountSpentTwoWeeks == null ? 0L : amountSpentTwoWeeks,
Expand Down

0 comments on commit c29a4f5

Please sign in to comment.