-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from TeamMiso/feat/point-info
포인트 정보 불러오기 API 구현
- Loading branch information
Showing
6 changed files
with
57 additions
and
1 deletion.
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
5 changes: 5 additions & 0 deletions
5
src/main/kotlin/andreas311/miso/domain/user/adapter/input/data/response/PointResponse.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,5 @@ | ||
package andreas311.miso.domain.user.adapter.input.data.response | ||
|
||
data class PointResponse( | ||
val point: Int | ||
) |
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
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/andreas311/miso/domain/user/application/port/input/GetPointUseCase.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,7 @@ | ||
package andreas311.miso.domain.user.application.port.input | ||
|
||
import andreas311.miso.domain.user.application.port.input.dto.PointDto | ||
|
||
interface GetPointUseCase { | ||
fun execute(): PointDto | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/PointDto.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,11 @@ | ||
package andreas311.miso.domain.user.application.port.input.dto | ||
|
||
import andreas311.miso.domain.user.domain.User | ||
|
||
data class PointDto( | ||
val point: Int | ||
) { | ||
constructor(user: User) : this( | ||
point = user.point | ||
) | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/kotlin/andreas311/miso/domain/user/application/service/GetPointService.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,17 @@ | ||
package andreas311.miso.domain.user.application.service | ||
|
||
import andreas311.miso.common.annotation.ReadOnlyRollbackService | ||
import andreas311.miso.domain.auth.application.port.output.UserSecurityPort | ||
import andreas311.miso.domain.user.application.port.input.GetPointUseCase | ||
import andreas311.miso.domain.user.application.port.input.dto.PointDto | ||
|
||
@ReadOnlyRollbackService | ||
class GetPointService( | ||
private val userSecurityPort: UserSecurityPort | ||
) : GetPointUseCase { | ||
override fun execute(): PointDto { | ||
val user = userSecurityPort.currentUser() | ||
|
||
return PointDto(user) | ||
} | ||
} |