-
Notifications
You must be signed in to change notification settings - Fork 0
[WTH-434] 회비 수정사항 반영 #88
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
Merged
The head ref may contain hidden characters: "fix/WTH-434-\uD68C\uBE44-\uC720\uC800\uC0AC\uC774\uB4DC-\uB0B4\uAC00-\uCC38\uC5EC\uD55C-\uAE30\uC218\uB9CC-\uB178\uCD9C\uD558\uB3C4\uB85D-\uC218\uC815"
+463
−30
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
42847f1
refactor: 부원 공개 여부 필드 추가
hyxklee 982bc8c
refactor: LocalDateTime으로 수정
hyxklee 9d29c36
refactor: 참여한 기수만 보이며, 접근할 수 있도록 수정
hyxklee 9d54af4
feat: 총잔액 추가
hyxklee ebd3f19
feat: 제외 처리 API 추가
hyxklee 4c04477
feat: db 마이그레이션 쿼리 추가
hyxklee 851cba3
refactor: 일정으로 원복 및 id 기준 정렬 추가
hyxklee 26d633b
refactor: 리뷰 내용 반영
hyxklee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
10 changes: 10 additions & 0 deletions
10
...n/kotlin/com/weeth/domain/account/application/dto/request/ExcludePaymentTargetsRequest.kt
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.weeth.domain.account.application.dto.request | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema | ||
| import jakarta.validation.constraints.NotEmpty | ||
|
|
||
| data class ExcludePaymentTargetsRequest( | ||
| @field:Schema(description = "납부 대상에서 제외할 납부 대상 ID 목록 (단건은 길이 1)", example = "[1, 2, 3]") | ||
| @field:NotEmpty | ||
| val targetIds: List<Long>, | ||
| ) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
32 changes: 32 additions & 0 deletions
32
src/main/resources/db/migration/V9__add_account_transaction_balance_after.sql
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ALTER TABLE account_transaction | ||
| ADD COLUMN balance_after INT NULL AFTER transacted_at; | ||
|
|
||
| -- 적용 순서를 복원할 별도 컬럼이 없어 백필은 거래일(transacted_at)을 source of truth 로 삼는다. | ||
| -- 소급 등록으로 실제 적용 순서와 거래일 순서가 달랐던 과거 데이터는 거래일 순 누적 잔액으로 보정된다. | ||
| UPDATE account_transaction target | ||
| JOIN ( | ||
| SELECT | ||
| account_transaction_id, | ||
| SUM( | ||
| CASE direction | ||
| WHEN 'INCOME' THEN amount | ||
| WHEN 'EXPENSE' THEN -amount | ||
| ELSE 0 | ||
| END | ||
| ) OVER ( | ||
| PARTITION BY account_id | ||
| ORDER BY transacted_at ASC, account_transaction_id ASC | ||
| ) AS calculated_balance_after | ||
| FROM account_transaction | ||
| WHERE deleted_at IS NULL | ||
| AND is_applied = TRUE | ||
| ) running_balance | ||
| ON target.account_transaction_id = running_balance.account_transaction_id | ||
| SET target.balance_after = running_balance.calculated_balance_after; | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| UPDATE account_transaction | ||
| SET balance_after = 0 | ||
| WHERE balance_after IS NULL; | ||
|
|
||
| ALTER TABLE account_transaction | ||
| MODIFY COLUMN balance_after INT NOT NULL; | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.