-
Notifications
You must be signed in to change notification settings - Fork 0
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
🔀 :: (#16) 전체 코드 리팩토링 #52
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b86f019
♻️ :: 패키지 이동 및 파일 이름 변경
lyutvs 3358218
📑 :: PointStatusApiImpl
lyutvs 2e34c3b
📑 :: PointStatusApi
lyutvs 4a091f1
📑 :: CommandPointSpi
lyutvs d9de87e
📑 :: CommandPointHistorySpi
lyutvs 66be9ba
📑 :: CommandPointStatusSpi
lyutvs 6ef4dc0
♻️ :: 메소드 분활
lyutvs e480fa9
♻️ :: ktlint
lyutvs 172d7e4
♻️ :: 메소드명 수정
lyutvs 119e9cb
♻️ :: companion object 추가 & 유저 생성시 penaltyLevel 0 으로
lyutvs 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
9 changes: 1 addition & 8 deletions
9
point-domain/src/main/kotlin/com/xquare/v1servicepoint/point/api/PointApi.kt
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,23 +1,16 @@ | ||
package com.xquare.v1servicepoint.point.api | ||
|
||
import com.xquare.v1servicepoint.point.api.dto.request.DomainUpdatePointRoleRequest | ||
import com.xquare.v1servicepoint.point.api.dto.request.DomainSavePointRoleRequest | ||
import com.xquare.v1servicepoint.point.api.dto.request.DomainUpdatePointRoleRequest | ||
import com.xquare.v1servicepoint.point.api.dto.response.PointRuleListResponse | ||
import com.xquare.v1servicepoint.point.api.dto.response.PointStatusResponse | ||
import com.xquare.v1servicepoint.point.api.dto.response.PointStudentStatusResponse | ||
import java.util.UUID | ||
|
||
interface PointApi { | ||
|
||
suspend fun queryPointStatus(userId: UUID): PointStatusResponse | ||
|
||
suspend fun updatePointRole(pointId: UUID, request: DomainUpdatePointRoleRequest) | ||
|
||
suspend fun deletePointRole(pointId: UUID) | ||
|
||
suspend fun savePointRole(request: DomainSavePointRoleRequest) | ||
|
||
suspend fun queryPointRoleList(type: Boolean): PointRuleListResponse | ||
|
||
suspend fun queryStudentStatus(name: String?, penaltyLevel: Int?): PointStudentStatusResponse | ||
} |
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
16 changes: 16 additions & 0 deletions
16
point-domain/src/main/kotlin/com/xquare/v1servicepoint/point/api/PointStatusApi.kt
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.xquare.v1servicepoint.point.api | ||
|
||
import com.xquare.v1servicepoint.point.api.dto.response.PointStatusResponse | ||
import com.xquare.v1servicepoint.point.api.dto.response.PointStudentStatusResponse | ||
import java.util.UUID | ||
|
||
interface PointStatusApi { | ||
|
||
suspend fun saveUserPenaltyEducationComplete(userId: UUID) | ||
|
||
suspend fun savePointStatus(userId: UUID) | ||
|
||
suspend fun queryUserPointStatus(userId: UUID): PointStatusResponse | ||
|
||
suspend fun queryStudentStatus(name: String?, penaltyLevel: Int?): PointStudentStatusResponse | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command / query 나눈건 CQRS 구현한거야?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이부분 보고 수정했는데 코멘트 달아주실거 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CQRS를 사용한 이유는?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제 의도는 command와 query의 책임을 분리한다 라는 생각을 가지고 적용 해봤던것 같습니다.
interface와 구현체 모두 두가의 성격을 모두 가지고 있어 서로 다른 성격을 가지는 부분을 한부분에서 관리 한다는건 포괄적으로 관리 하는것 같아 분리했습니다.
근데 할거면 query 모델 command 모델을 따로 놔둔 상태에서 적용시켜야 했고 위에서 말했듯이 구현체도 함께 구분 했어야 했는데 그부분은 빼먹었던것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CQRS가 정말 필요한거야?
모든 Query 거의 동일한 모델을 쓰고 있고, 복잡하지도 않아보여서
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳이 필요하진 않은것 같아요. interface만 분리해서 사용하는걸 고려하고 있어요