diff --git a/src/main/java/org/winey/server/controller/response/user/UserResponseDto.java b/src/main/java/org/winey/server/controller/response/user/UserResponseDto.java index 45281be..f226b73 100644 --- a/src/main/java/org/winey/server/controller/response/user/UserResponseDto.java +++ b/src/main/java/org/winey/server/controller/response/user/UserResponseDto.java @@ -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; @@ -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); } diff --git a/src/main/java/org/winey/server/service/UserService.java b/src/main/java/org/winey/server/service/UserService.java index 41e3f41..2b9bcdb 100644 --- a/src/main/java/org/winey/server/service/UserService.java +++ b/src/main/java/org/winey/server/service/UserService.java @@ -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,