-
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.
- Loading branch information
Showing
7 changed files
with
95 additions
and
6 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
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
36 changes: 36 additions & 0 deletions
36
api/src/main/kotlin/com/oksusu/susu/api/envelope/model/request/DevSearchEnvelopeRequest.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,36 @@ | ||
package com.oksusu.susu.api.envelope.model.request | ||
|
||
import com.oksusu.susu.api.envelope.model.request.SearchEnvelopeRequest.IncludeSpec | ||
import com.oksusu.susu.domain.envelope.domain.vo.EnvelopeType | ||
|
||
data class DevSearchEnvelopeRequest( | ||
/** 검색할 uid */ | ||
val uid: Long, | ||
/** 지인 id */ | ||
val friendIds: Set<Long>?, | ||
/** 지인 이름 */ | ||
val friendName: String?, | ||
/** 장부 id */ | ||
val ledgerId: Long?, | ||
/** type: SENT, RECEIVED */ | ||
val types: Set<EnvelopeType>?, | ||
/** 포함할 데이터 목록 */ | ||
val include: Set<IncludeSpec>?, | ||
/** 금액 조건 from */ | ||
val fromAmount: Long?, | ||
/** 금액 조건 to */ | ||
val toAmount: Long?, | ||
) { | ||
fun convert(): SearchEnvelopeRequest { | ||
return SearchEnvelopeRequest( | ||
friendIds = this.friendIds, | ||
friendName = this.friendName, | ||
ledgerId = this.ledgerId, | ||
types = this.types, | ||
include = this.include, | ||
fromAmount = this.fromAmount, | ||
toAmount = this.toAmount | ||
) | ||
} | ||
} | ||
|
34 changes: 34 additions & 0 deletions
34
api/src/main/kotlin/com/oksusu/susu/api/envelope/presentation/DevEnvelopeResource.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,34 @@ | ||
package com.oksusu.susu.api.envelope.presentation | ||
|
||
import com.oksusu.susu.api.auth.model.AdminUser | ||
import com.oksusu.susu.api.common.dto.SusuPageRequest | ||
import com.oksusu.susu.api.config.web.SwaggerTag | ||
import com.oksusu.susu.api.envelope.application.EnvelopeFacade | ||
import com.oksusu.susu.api.envelope.model.request.DevSearchEnvelopeRequest | ||
import com.oksusu.susu.api.extension.wrapPage | ||
import io.swagger.v3.oas.annotations.Operation | ||
import io.swagger.v3.oas.annotations.tags.Tag | ||
import org.springdoc.core.annotations.ParameterObject | ||
import org.springframework.http.MediaType | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.RequestMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@Tag(name = SwaggerTag.DEV_ENVELOPE_SWAGGER_TAG, description = "개발용 OAuth API") | ||
@RestController | ||
@RequestMapping(value = ["/api/v1/dev/envelopes"], produces = [MediaType.APPLICATION_JSON_VALUE]) | ||
class DevEnvelopeResource( | ||
private val envelopeFacade: EnvelopeFacade, | ||
) { | ||
@Operation(tags = [SwaggerTag.DEV_SWAGGER_TAG], summary = "hour summary 호출") | ||
@GetMapping("/hour-summaries") | ||
suspend fun getHourSummaries( | ||
adminUser: AdminUser, | ||
@ParameterObject request: DevSearchEnvelopeRequest, | ||
@ParameterObject pageRequest: SusuPageRequest, | ||
) = envelopeFacade.search( | ||
uid = request.uid, | ||
request = request.convert(), | ||
pageRequest = pageRequest | ||
).wrapPage() | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version=1.1.15 | ||
version=1.1.16 | ||
kotlin.code.style=official |