From 353e1da4efa5b651a88cf765be06a8a11f8a669c Mon Sep 17 00:00:00 2001 From: sw-develop Date: Sun, 21 Jul 2024 14:56:13 +0900 Subject: [PATCH] mod: ktlint formatting --- api/src/main/kotlin/com/mashup/dojo/PickController.kt | 4 ++-- api/src/main/kotlin/com/mashup/dojo/dto/PickDto.kt | 4 ++-- .../kotlin/com/mashup/dojo/service/PickService.kt | 11 +++++------ .../kotlin/com/mashup/dojo/usecase/PickUseCase.kt | 11 ++++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/api/src/main/kotlin/com/mashup/dojo/PickController.kt b/api/src/main/kotlin/com/mashup/dojo/PickController.kt index a78256a6..0f9ecc5b 100644 --- a/api/src/main/kotlin/com/mashup/dojo/PickController.kt +++ b/api/src/main/kotlin/com/mashup/dojo/PickController.kt @@ -52,7 +52,7 @@ class PickController( } return DojoApiResponse.success(ReceivedPickListGetResponse(pickResponseList, sort)) } - + @PostMapping("/open") @Operation( summary = "내가 받은 픽 정보 오픈 API", @@ -63,7 +63,7 @@ class PickController( ) fun openPick( // todo: add userInfo - @Valid @RequestBody request: PickOpenRequest + @Valid @RequestBody request: PickOpenRequest, ): DojoApiResponse { return pickUseCase.openPick( PickUseCase.OpenPickCommand(pickId = request.pickId, pickedId = MemberId("MOCK_MEMBER_ID"), pickOpenItem = request.pickOpenItem) diff --git a/api/src/main/kotlin/com/mashup/dojo/dto/PickDto.kt b/api/src/main/kotlin/com/mashup/dojo/dto/PickDto.kt index 29de0bd5..e9cf34bd 100644 --- a/api/src/main/kotlin/com/mashup/dojo/dto/PickDto.kt +++ b/api/src/main/kotlin/com/mashup/dojo/dto/PickDto.kt @@ -28,11 +28,11 @@ data class PickOpenRequest( @field:NotBlank val pickId: PickId, @field:NotNull - val pickOpenItem: PickOpenItem + val pickOpenItem: PickOpenItem, ) data class PickOpenResponse( val pickId: PickId, val pickOpenItem: PickOpenItem, - val value: String + val value: String, ) diff --git a/service/src/main/kotlin/com/mashup/dojo/service/PickService.kt b/service/src/main/kotlin/com/mashup/dojo/service/PickService.kt index 747bde1c..462df007 100644 --- a/service/src/main/kotlin/com/mashup/dojo/service/PickService.kt +++ b/service/src/main/kotlin/com/mashup/dojo/service/PickService.kt @@ -19,13 +19,13 @@ interface PickService { fun openPick( pickId: PickId, pickedId: MemberId, - pickOpenItem: PickOpenItem + pickOpenItem: PickOpenItem, ): String } @Transactional(readOnly = true) @Service -class DefaultPickService: PickService { +class DefaultPickService : PickService { override fun getReceivedPickList( pickedMemberId: MemberId, sort: PickSort, @@ -39,7 +39,7 @@ class DefaultPickService: PickService { override fun openPick( pickId: PickId, pickedId: MemberId, - pickOpenItem: PickOpenItem + pickOpenItem: PickOpenItem, ): String { // todo : 로직 구현 // Pick 조회 @@ -47,9 +47,8 @@ class DefaultPickService: PickService { // Pick 유효성 검사 // - 전달된 pickedId와 조회된 Pick.pickedId 값이 같지 않을 때 : 예외 반환 // Pick Open 처리 - // - 오픈하지 않은 정보일 때 : 해당 정보 오픈 처리, 해당 정보 반환 - // - 이미 오픈한 정보일 때 : 예외 반환 - + // - 오픈하지 않은 정보일 때 : 해당 정보 오픈 처리, 해당 정보 반환 + // - 이미 오픈한 정보일 때 : 예외 반환 return "MOCK_PICK_INFO_VALUE" } diff --git a/service/src/main/kotlin/com/mashup/dojo/usecase/PickUseCase.kt b/service/src/main/kotlin/com/mashup/dojo/usecase/PickUseCase.kt index 14ea91da..af513b0c 100644 --- a/service/src/main/kotlin/com/mashup/dojo/usecase/PickUseCase.kt +++ b/service/src/main/kotlin/com/mashup/dojo/usecase/PickUseCase.kt @@ -35,16 +35,17 @@ interface PickUseCase { data class OpenPickCommand( val pickId: PickId, val pickedId: MemberId, - val pickOpenItem: PickOpenItem + val pickOpenItem: PickOpenItem, ) - data class PickOpenInfo ( + data class PickOpenInfo( val pickId: PickId, val pickOpenItem: PickOpenItem, - val value: String + val value: String, ) - + fun getReceivedPickList(command: GetReceivedPickListCommand): List + fun openPick(openPickCommand: OpenPickCommand): PickOpenInfo } @@ -93,7 +94,7 @@ class DefaultPickUseCase( override fun openPick(openPickCommand: OpenPickCommand): PickOpenInfo { return pickService.openPick( - openPickCommand.pickId, + openPickCommand.pickId, openPickCommand.pickedId, openPickCommand.pickOpenItem ).let { PickOpenInfo(openPickCommand.pickId, openPickCommand.pickOpenItem, it) }