From 77c53a68f42015f8466c521f48ba36ebb6a55949 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:53:16 +0900 Subject: [PATCH 01/16] feat ( #58 ) : ApplicationCaseQueryApplicationContract.kt --- .../interfaces/ApplicationCaseQueryApplicationContract.kt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationCaseQueryApplicationContract.kt diff --git a/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationCaseQueryApplicationContract.kt b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationCaseQueryApplicationContract.kt new file mode 100644 index 00000000..ae0c1505 --- /dev/null +++ b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationCaseQueryApplicationContract.kt @@ -0,0 +1,8 @@ +package hs.kr.entrydsm.domain.application.interfaces + +import hs.kr.entrydsm.domain.application.aggregates.Application +import java.util.UUID + +interface ApplicationCaseQueryApplicationContract { + fun queryApplicationByUserId(userId: UUID): Application? +} \ No newline at end of file From cfb46842fa878cb329eced28e19f8ce8d5f78690 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:53:28 +0900 Subject: [PATCH 02/16] feat ( #58 ) : ApplicationQueryScheduleContract --- .../interfaces/ApplicationQueryScheduleContract.kt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationQueryScheduleContract.kt diff --git a/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationQueryScheduleContract.kt b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationQueryScheduleContract.kt new file mode 100644 index 00000000..11706593 --- /dev/null +++ b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/application/interfaces/ApplicationQueryScheduleContract.kt @@ -0,0 +1,8 @@ +package hs.kr.entrydsm.domain.application.interfaces + +import hs.kr.entrydsm.domain.schedule.aggregates.Schedule +import hs.kr.entrydsm.domain.schedule.values.ScheduleType + +interface ApplicationQueryScheduleContract { + suspend fun queryByScheduleType(scheduleType: ScheduleType): Schedule? +} \ No newline at end of file From 541071e3fb5aa17b8bf3fce948b62ecc0f2ffd11 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:53:41 +0900 Subject: [PATCH 03/16] feat ( #58 ) : QueryIsFirstRoundPassResponse --- .../dto/response/QueryIsFirstRoundPassResponse.kt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsFirstRoundPassResponse.kt diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsFirstRoundPassResponse.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsFirstRoundPassResponse.kt new file mode 100644 index 00000000..9e8b27f8 --- /dev/null +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsFirstRoundPassResponse.kt @@ -0,0 +1,5 @@ +package hs.kr.entrydsm.application.domain.pass.presentation.dto.response + +data class QueryIsFirstRoundPassResponse( + val isFirstRoundPass: Boolean +) From 8552884b055f0ae1f20a49fd3bd26f9e458bccfb Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:53:49 +0900 Subject: [PATCH 04/16] feat ( #58 ) : QueryIsFirstRoundPassUseCase --- .../usecase/QueryIsFirstRoundPassUseCase.kt | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsFirstRoundPassUseCase.kt diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsFirstRoundPassUseCase.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsFirstRoundPassUseCase.kt new file mode 100644 index 00000000..5dbcd51d --- /dev/null +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsFirstRoundPassUseCase.kt @@ -0,0 +1,39 @@ +package hs.kr.entrydsm.application.domain.application.usecase + +import hs.kr.entrydsm.application.domain.application.exception.ApplicationNotFoundException +import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsFirstRoundPassResponse +import hs.kr.entrydsm.application.global.annotation.usecase.ReadOnlyUseCase +import hs.kr.entrydsm.application.global.security.SecurityAdapter +import hs.kr.entrydsm.domain.application.interfaces.ApplicationContract +import hs.kr.entrydsm.domain.application.interfaces.ApplicationQueryScheduleContract +import hs.kr.entrydsm.domain.schedule.exception.ScheduleExceptions +import hs.kr.entrydsm.domain.schedule.values.ScheduleType +import hs.kr.entrydsm.domain.status.exception.StatusExceptions +import hs.kr.entrydsm.domain.status.interfaces.ApplicationQueryStatusContract +import java.time.LocalDateTime + +@ReadOnlyUseCase +class QueryIsFirstRoundPassUseCase( + private val securityAdapter: SecurityAdapter, + private val queryApplicationContract: ApplicationContract, + private val applicationQueryScheduleContract: ApplicationQueryScheduleContract, + private val applicationQueryStatusContract: ApplicationQueryStatusContract +) { + suspend fun execute(): QueryIsFirstRoundPassResponse { + + val userId = securityAdapter.getCurrentUserId() + val application = queryApplicationContract.getApplicationByUserId(userId) + ?: throw ApplicationNotFoundException() + + val firstAnnounce = applicationQueryScheduleContract.queryByScheduleType(ScheduleType.FIRST_ANNOUNCEMENT) + ?: throw ScheduleExceptions.ScoreNotFoundException() + + if (LocalDateTime.now().isBefore(firstAnnounce.date)) + throw ScheduleExceptions.AdmissionUnavailableException() + + val status = applicationQueryStatusContract.queryStatusByReceiptCode(application.receiptCode) + ?: throw StatusExceptions.StatusNotFoundException() + + return QueryIsFirstRoundPassResponse(status.isFirstRoundPass) + } +} \ No newline at end of file From 82ed1f556740053792de4d002439a24adb91758e Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:53:59 +0900 Subject: [PATCH 05/16] feat ( #58 ) : QueryIsSecondRoundPassResponse --- .../dto/response/QueryIsSecondRoundPassResponse.kt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsSecondRoundPassResponse.kt diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsSecondRoundPassResponse.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsSecondRoundPassResponse.kt new file mode 100644 index 00000000..22071ac3 --- /dev/null +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/dto/response/QueryIsSecondRoundPassResponse.kt @@ -0,0 +1,5 @@ +package hs.kr.entrydsm.application.domain.pass.presentation.dto.response + +data class QueryIsSecondRoundPassResponse( + val finalPass: Boolean +) From 74411b9edac7954a2543a790e3248399c5837f20 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:07 +0900 Subject: [PATCH 06/16] feat ( #58 ) : QueryIsSecondRoundPassUseCase --- .../usecase/QueryIsSecondRoundPassUseCase.kt | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsSecondRoundPassUseCase.kt diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsSecondRoundPassUseCase.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsSecondRoundPassUseCase.kt new file mode 100644 index 00000000..fa392060 --- /dev/null +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/application/usecase/QueryIsSecondRoundPassUseCase.kt @@ -0,0 +1,38 @@ +package hs.kr.entrydsm.application.domain.application.usecase + +import hs.kr.entrydsm.application.domain.application.exception.ApplicationNotFoundException +import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsSecondRoundPassResponse +import hs.kr.entrydsm.application.global.annotation.usecase.ReadOnlyUseCase +import hs.kr.entrydsm.application.global.security.SecurityAdapter +import hs.kr.entrydsm.domain.application.interfaces.ApplicationContract +import hs.kr.entrydsm.domain.application.interfaces.ApplicationQueryScheduleContract +import hs.kr.entrydsm.domain.schedule.exception.ScheduleExceptions +import hs.kr.entrydsm.domain.schedule.values.ScheduleType +import hs.kr.entrydsm.domain.status.exception.StatusExceptions +import hs.kr.entrydsm.domain.status.interfaces.ApplicationQueryStatusContract +import java.time.LocalDateTime + +@ReadOnlyUseCase +class QueryIsSecondRoundPassUseCase ( + private val securityAdapter: SecurityAdapter, + private val queryApplicationContract: ApplicationContract, + private val applicationQueryScheduleContract: ApplicationQueryScheduleContract, + private val applicationQueryStatusContract: ApplicationQueryStatusContract +) { + suspend fun execute(): QueryIsSecondRoundPassResponse { + val userId = securityAdapter.getCurrentUserId() + val application = queryApplicationContract.getApplicationByUserId(userId) + ?: throw ApplicationNotFoundException() + + val secondAnnounce = applicationQueryScheduleContract.queryByScheduleType(ScheduleType.SECOND_ANNOUNCEMENT) + ?: throw ScheduleExceptions.ScoreNotFoundException() + + if (LocalDateTime.now().isBefore(secondAnnounce.date)) + throw ScheduleExceptions.AdmissionUnavailableException() + + val status = applicationQueryStatusContract.queryStatusByReceiptCode(application.receiptCode) + ?: throw StatusExceptions.StatusNotFoundException() + + return QueryIsSecondRoundPassResponse(status.isSecondRoundPass) + } +} \ No newline at end of file From 323622850310281b4ac25e00130db26a58ac63db Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:16 +0900 Subject: [PATCH 07/16] feat ( #58 ) : Schedule Aggregate --- .../entrydsm/domain/schedule/aggregates/Schedule.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/aggregates/Schedule.kt diff --git a/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/aggregates/Schedule.kt b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/aggregates/Schedule.kt new file mode 100644 index 00000000..5aa136a7 --- /dev/null +++ b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/aggregates/Schedule.kt @@ -0,0 +1,11 @@ +package hs.kr.entrydsm.domain.schedule.aggregates + +import hs.kr.entrydsm.domain.schedule.values.ScheduleType +import hs.kr.entrydsm.global.annotation.aggregates.Aggregate +import java.time.LocalDateTime + +@Aggregate(context = "schedule") +data class Schedule( + val scheduleType: ScheduleType, + val date: LocalDateTime +) From 676a0a96e5085c1e360ee129dff70d48f752bfe1 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:24 +0900 Subject: [PATCH 08/16] feat ( #58 ) : ScheduleExceptions --- .../schedule/exception/ScheduleExceptions.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/exception/ScheduleExceptions.kt diff --git a/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/exception/ScheduleExceptions.kt b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/exception/ScheduleExceptions.kt new file mode 100644 index 00000000..8faa659a --- /dev/null +++ b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/exception/ScheduleExceptions.kt @@ -0,0 +1,20 @@ +package hs.kr.entrydsm.domain.schedule.exception + +import hs.kr.entrydsm.global.exception.BusinessException + +sealed class ScheduleExceptions( + override val status: Int, + override val message: String, +) : BusinessException(status, message) { + + class ScoreNotFoundException(message: String = SCORE_NOT_FOUND_EXCEPTION): + ScheduleExceptions(404, message) + + class AdmissionUnavailableException(message: String = ADMISSION_UNAVAILABLE): + ScheduleExceptions(404, message) + + companion object { + private const val SCORE_NOT_FOUND_EXCEPTION = "점수가 존재하지 않습니다" + private const val ADMISSION_UNAVAILABLE = "합격여부를 확인할 수 없습니다" + } +} \ No newline at end of file From fac28d6f5d2bce8583d16215dd30cb5d02d66913 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:33 +0900 Subject: [PATCH 09/16] feat ( #58 ) : SchedulePersistenceAdapterApplication --- .../SchedulePersistenceAdapterApplication.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/schedule/domain/SchedulePersistenceAdapterApplication.kt diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/schedule/domain/SchedulePersistenceAdapterApplication.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/schedule/domain/SchedulePersistenceAdapterApplication.kt new file mode 100644 index 00000000..676a887d --- /dev/null +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/schedule/domain/SchedulePersistenceAdapterApplication.kt @@ -0,0 +1,21 @@ +package hs.kr.entrydsm.application.domain.schedule.domain + +import hs.kr.entrydsm.application.global.grpc.client.schedule.ScheduleGrpcClient +import hs.kr.entrydsm.domain.application.interfaces.ApplicationQueryScheduleContract +import hs.kr.entrydsm.domain.schedule.aggregates.Schedule +import hs.kr.entrydsm.domain.schedule.values.ScheduleType +import org.springframework.stereotype.Component + +@Component +class SchedulePersistenceAdapterApplication( + private val scheduleGrpcClient: ScheduleGrpcClient +) : ApplicationQueryScheduleContract { + override suspend fun queryByScheduleType(scheduleType: ScheduleType): Schedule? { + return scheduleGrpcClient.getScheduleByType(scheduleType.name).let { + Schedule( + scheduleType = it.type, + date = it.date + ) + } + } +} \ No newline at end of file From aeb73d3731d8361e66d5e6315db5ee2de88db486 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:39 +0900 Subject: [PATCH 10/16] feat ( #58 ) : ScheduleType --- .../kr/entrydsm/domain/schedule/values/ScheduleType.kt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/values/ScheduleType.kt diff --git a/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/values/ScheduleType.kt b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/values/ScheduleType.kt new file mode 100644 index 00000000..96340a19 --- /dev/null +++ b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/schedule/values/ScheduleType.kt @@ -0,0 +1,9 @@ +package hs.kr.entrydsm.domain.schedule.values + +enum class ScheduleType { + START_DATE, + FIRST_ANNOUNCEMENT, + INTERVIEW, + SECOND_ANNOUNCEMENT, + END_DATE +} \ No newline at end of file From 0cb364957173aa03b69d243411b4c98d3eb4f40e Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:45 +0900 Subject: [PATCH 11/16] feat ( #58 ) : StatusExceptions --- .../status/exception/StatusExceptions.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/status/exception/StatusExceptions.kt diff --git a/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/status/exception/StatusExceptions.kt b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/status/exception/StatusExceptions.kt new file mode 100644 index 00000000..df93094c --- /dev/null +++ b/casper-application-domain/src/main/kotlin/hs/kr/entrydsm/domain/status/exception/StatusExceptions.kt @@ -0,0 +1,19 @@ +package hs.kr.entrydsm.domain.status.exception + +import hs.kr.entrydsm.global.exception.BusinessException + +sealed class StatusExceptions( + override val status: Int, + override val message: String, +) : BusinessException(status, message) { + class StatusNotFoundException(message: String = STATUS_NOT_FOUND) : + StatusExceptions(404, message) + + class AlreadySubmittedException(message: String = ALREADY_SUBMITTED) : + StatusExceptions(409, message) + + companion object { + private const val STATUS_NOT_FOUND = "상태가 존재하지 않습니다" + private const val ALREADY_SUBMITTED = "이미 최종제출이 되어있습니다." + } +} \ No newline at end of file From 17a741ee36f7f6f0bf8b0de175944e1f42c37a6b Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:51 +0900 Subject: [PATCH 12/16] feat ( #58 ) : WebPassAdapter --- .../pass/presentation/WebPassAdapter.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt new file mode 100644 index 00000000..46f28daa --- /dev/null +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt @@ -0,0 +1,24 @@ +package hs.kr.entrydsm.application.domain.pass.presentation + +import hs.kr.entrydsm.application.domain.application.usecase.QueryIsFirstRoundPassUseCase +import hs.kr.entrydsm.application.domain.application.usecase.QueryIsSecondRoundPassUseCase +import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsFirstRoundPassResponse +import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsSecondRoundPassResponse +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +@RequestMapping("/pass") +class WebPassAdapter( + private val queryIsFirstRoundPassUseCase: QueryIsFirstRoundPassUseCase, + private val queryIsSecondRoundPassUseCase: QueryIsSecondRoundPassUseCase +) { + @GetMapping("/first-round") + suspend fun queryIsFirstRound(): QueryIsFirstRoundPassResponse = + queryIsFirstRoundPassUseCase.execute() + + @GetMapping("/second-round") + suspend fun queryIsSecondRound(): QueryIsSecondRoundPassResponse = + queryIsSecondRoundPassUseCase.execute() +} From 5a138a3f72d21e4248c97fd6abe100a6b63db0b6 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:54:59 +0900 Subject: [PATCH 13/16] refactor ( #58 ) : InternalScheduleResponse --- .../global/grpc/dto/schedule/InternalScheduleResponse.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/dto/schedule/InternalScheduleResponse.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/dto/schedule/InternalScheduleResponse.kt index 13091e1d..ee3eae89 100644 --- a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/dto/schedule/InternalScheduleResponse.kt +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/dto/schedule/InternalScheduleResponse.kt @@ -1,5 +1,6 @@ package hs.kr.entrydsm.application.global.grpc.dto.schedule +import hs.kr.entrydsm.domain.schedule.values.ScheduleType import java.time.LocalDateTime /** From 1b2327744774b6e0e83dbdaa819f93db7af7e914 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:55:05 +0900 Subject: [PATCH 14/16] refactor ( #58 ) : ScheduleGrpcClient --- .../global/grpc/client/schedule/ScheduleGrpcClient.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/client/schedule/ScheduleGrpcClient.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/client/schedule/ScheduleGrpcClient.kt index 6c7afa9f..d2e90c63 100644 --- a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/client/schedule/ScheduleGrpcClient.kt +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/grpc/client/schedule/ScheduleGrpcClient.kt @@ -2,9 +2,9 @@ package hs.kr.entrydsm.application.global.grpc.client.schedule import hs.kr.entrydsm.application.global.extension.executeGrpcCallWithResilience import hs.kr.entrydsm.application.global.grpc.dto.schedule.InternalScheduleResponse -import hs.kr.entrydsm.application.global.grpc.dto.schedule.ScheduleType import hs.kr.entrydsm.casper.schedule.proto.ScheduleServiceGrpc import hs.kr.entrydsm.casper.schedule.proto.ScheduleServiceProto +import hs.kr.entrydsm.domain.schedule.values.ScheduleType import io.github.resilience4j.circuitbreaker.CircuitBreaker import io.github.resilience4j.retry.Retry import io.grpc.Channel From 17b83072dbe71e5ab81be0c7bcc8d3353b3fccf7 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:58:50 +0900 Subject: [PATCH 15/16] feat ( #58 ) : PassApiDocument --- .../global/document/pass/PassApiDocument.kt | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/document/pass/PassApiDocument.kt diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/document/pass/PassApiDocument.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/document/pass/PassApiDocument.kt new file mode 100644 index 00000000..9d220cef --- /dev/null +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/global/document/pass/PassApiDocument.kt @@ -0,0 +1,47 @@ +package hs.kr.entrydsm.application.global.document.pass + +import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsFirstRoundPassResponse +import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsSecondRoundPassResponse +import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Content +import io.swagger.v3.oas.annotations.media.Schema +import io.swagger.v3.oas.annotations.responses.ApiResponse +import io.swagger.v3.oas.annotations.responses.ApiResponses +import io.swagger.v3.oas.annotations.tags.Tag + +@Tag(name = "Pass", description = "합격 여부 조회 API") +interface PassApiDocument { + @Operation( + summary = "1차 전형 합격 여부 조회", + description = "현재 로그인한 사용자의 1차 전형 합격 여부를 조회합니다.", + ) + @ApiResponses( + value = [ + ApiResponse( + responseCode = "200", + description = "합격 여부 조회 성공", + content = [Content(schema = Schema(implementation = QueryIsFirstRoundPassResponse::class))] + ), + ApiResponse(responseCode = "403", description = "인증되지 않은 사용자"), + ApiResponse(responseCode = "404", description = "지원자 또는 전형 정보를 찾을 수 없음"), + ] + ) + suspend fun queryIsFirstRound(): QueryIsFirstRoundPassResponse + + @Operation( + summary = "2차 전형 최종 합격 여부 조회", + description = "현재 로그인한 사용자의 2차 전형 최종 합격 여부를 조회합니다.", + ) + @ApiResponses( + value = [ + ApiResponse( + responseCode = "200", + description = "합격 여부 조회 성공", + content = [Content(schema = Schema(implementation = QueryIsSecondRoundPassResponse::class))] + ), + ApiResponse(responseCode = "403", description = "인증되지 않은 사용자"), + ApiResponse(responseCode = "404", description = "지원자 또는 전형 정보를 찾을 수 없음"), + ] + ) + suspend fun queryIsSecondRound(): QueryIsSecondRoundPassResponse +} From b881f722f8698871306e9e9e6301db6622656a64 Mon Sep 17 00:00:00 2001 From: coehgns Date: Tue, 7 Oct 2025 21:59:03 +0900 Subject: [PATCH 16/16] =?UTF-8?q?feat=20(=20#58=20)=20:=20WebPassAdapter?= =?UTF-8?q?=EC=97=90=20=EC=8A=A4=EC=9B=A8=EA=B1=B0=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/domain/pass/presentation/WebPassAdapter.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt index 46f28daa..a7e30c9b 100644 --- a/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt +++ b/casper-application-infrastructure/src/main/kotlin/hs/kr/entrydsm/application/domain/pass/presentation/WebPassAdapter.kt @@ -4,6 +4,7 @@ import hs.kr.entrydsm.application.domain.application.usecase.QueryIsFirstRoundPa import hs.kr.entrydsm.application.domain.application.usecase.QueryIsSecondRoundPassUseCase import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsFirstRoundPassResponse import hs.kr.entrydsm.application.domain.pass.presentation.dto.response.QueryIsSecondRoundPassResponse +import hs.kr.entrydsm.application.global.document.pass.PassApiDocument import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController @@ -13,12 +14,12 @@ import org.springframework.web.bind.annotation.RestController class WebPassAdapter( private val queryIsFirstRoundPassUseCase: QueryIsFirstRoundPassUseCase, private val queryIsSecondRoundPassUseCase: QueryIsSecondRoundPassUseCase -) { +) : PassApiDocument { @GetMapping("/first-round") - suspend fun queryIsFirstRound(): QueryIsFirstRoundPassResponse = + override suspend fun queryIsFirstRound(): QueryIsFirstRoundPassResponse = queryIsFirstRoundPassUseCase.execute() @GetMapping("/second-round") - suspend fun queryIsSecondRound(): QueryIsSecondRoundPassResponse = + override suspend fun queryIsSecondRound(): QueryIsSecondRoundPassResponse = queryIsSecondRoundPassUseCase.execute() }