-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ✏️ 총 지출 총합 값의 정수 범위 초과 케이스를 고려하여 타입 수정 (#133)
* fix: target_amount_dto 원시 타입으로 수정 * fix: spending_search_res daily_total_amount int -> long * fix: daily_total_amount total_spending 계산 시, 반환 타입 long으로 수정 * fix: recent_target_amount_res 필드 원시 타입으로 수정 * style: spending_service 총 지출 금액 조회 메서드 인접하게 위치 수정 * fix: 총 지출 금액 dto amount 필드 int -> long * style: target_amount_usecase 함수 호출 스니펫과 return 문 사이 공백 추가 * fix: 가장 최근 목표 금액의 amount가 0인 경우가 존재할 수 있으므로, 타입을 래퍼 타입으로 수정 * feat: total_spending_amount year_month 반환 메서드 추가 * fix: int 타입 long으로 변환 및 코드 정리 * fix: target amount update int -> long 타입 수정 * fix: querydsl total_spending_amount 기본 타입 expression 정의 * test: target amount controller unit test get_id() null 에러 핸들링 * test: max integer 범위 초과한 경우 diff_amount, total_spending 출력 확인 * fix: to_year_month_map 동시성 환경을 고려하여, concurrent_map 타입으로 반환
- Loading branch information
1 parent
3bc5ea6
commit 127cf5c
Showing
13 changed files
with
101 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ permissions: | |
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
types: [ opened ] | ||
|
||
jobs: | ||
test: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 16 additions & 4 deletions
20
...-domain/src/main/java/kr/co/pennyway/domain/domains/spending/dto/TotalSpendingAmount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
package kr.co.pennyway.domain.domains.spending.dto; | ||
|
||
import java.time.YearMonth; | ||
|
||
/** | ||
* 사용자의 해당 년/월 총 지출 금액을 담는 DTO | ||
*/ | ||
public record TotalSpendingAmount( | ||
Integer year, | ||
Integer month, | ||
Integer totalSpending | ||
int year, | ||
int month, | ||
long totalSpending | ||
) { | ||
public TotalSpendingAmount(Integer year, Integer month, Integer totalSpending) { | ||
public TotalSpendingAmount(int year, int month, long totalSpending) { | ||
this.year = year; | ||
this.month = month; | ||
this.totalSpending = totalSpending; | ||
} | ||
|
||
/** | ||
* YearMonth 객체로 변환하는 메서드 | ||
* | ||
* @return 해당 년/월을 나타내는 YearMonth 객체 | ||
*/ | ||
public YearMonth getYearMonth() { | ||
return YearMonth.of(year, month); | ||
} | ||
|
||
} |
Oops, something went wrong.