Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor]#232 절약 누적횟수 추가 #233

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading