diff --git a/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/SubscriptionDao.kt b/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/SubscriptionDao.kt index d636e4127..f1b8df3ef 100644 --- a/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/SubscriptionDao.kt +++ b/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/SubscriptionDao.kt @@ -3,7 +3,7 @@ package com.few.api.repo.dao.subscription import com.few.api.repo.dao.subscription.command.InsertWorkbookSubscriptionCommand import com.few.api.repo.dao.subscription.command.UpdateDeletedAtInAllSubscriptionCommand import com.few.api.repo.dao.subscription.command.UpdateDeletedAtInWorkbookSubscriptionCommand -import com.few.api.repo.dao.subscription.query.SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt +import com.few.api.repo.dao.subscription.query.SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery import com.few.api.repo.dao.subscription.record.WorkbookSubscriptionStatus import com.few.api.repo.dao.subscription.query.CountWorkbookMappedArticlesQuery import com.few.api.repo.dao.subscription.record.CountAllSubscriptionStatusRecord @@ -44,7 +44,7 @@ class SubscriptionDao( .execute() } - fun selectTopWorkbookSubscriptionStatus(query: SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt): WorkbookSubscriptionStatus? { + fun selectTopWorkbookSubscriptionStatus(query: SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery): WorkbookSubscriptionStatus? { return dslContext.select( SUBSCRIPTION.TARGET_WORKBOOK_ID.`as`(WorkbookSubscriptionStatus::workbookId.name), SUBSCRIPTION.DELETED_AT.isNull.`as`(WorkbookSubscriptionStatus::isActiveSub.name), diff --git a/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/query/SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt.kt b/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/query/SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery.kt similarity index 72% rename from api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/query/SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt.kt rename to api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/query/SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery.kt index a9fee6419..0b210722b 100644 --- a/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/query/SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt.kt +++ b/api-repo/src/main/kotlin/com/few/api/repo/dao/subscription/query/SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery.kt @@ -3,7 +3,7 @@ package com.few.api.repo.dao.subscription.query /** * DeleteAt을 고려하지 않고 모든 워크북 구독 상태를 조회하는 쿼리 */ -data class SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt( +data class SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery( val workbookId: Long, val memberId: Long ) \ No newline at end of file diff --git a/api/src/main/kotlin/com/few/api/domain/subscription/usecase/SubscribeWorkbookUseCase.kt b/api/src/main/kotlin/com/few/api/domain/subscription/usecase/SubscribeWorkbookUseCase.kt index 45009081b..cf00a3498 100644 --- a/api/src/main/kotlin/com/few/api/domain/subscription/usecase/SubscribeWorkbookUseCase.kt +++ b/api/src/main/kotlin/com/few/api/domain/subscription/usecase/SubscribeWorkbookUseCase.kt @@ -6,7 +6,7 @@ import com.few.api.domain.subscription.service.dto.InsertMemberDto import com.few.api.domain.subscription.service.dto.ReadMemberIdDto import com.few.api.repo.dao.subscription.SubscriptionDao import com.few.api.repo.dao.subscription.command.InsertWorkbookSubscriptionCommand -import com.few.api.repo.dao.subscription.query.SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt +import com.few.api.repo.dao.subscription.query.SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery import com.few.api.domain.subscription.usecase.dto.SubscribeWorkbookUseCaseIn import com.few.api.exception.common.NotFoundException import com.few.api.exception.subscribe.SubscribeIllegalArgumentException @@ -38,7 +38,7 @@ class SubscribeWorkbookUseCase( ) val subscriptionStatus = subscriptionDao.selectTopWorkbookSubscriptionStatus( - SelectAllWorkbookSubscriptionStatusQueryNotConsiderDeletedAt(memberId = memberId, workbookId = subTargetWorkbookId) + SelectAllWorkbookSubscriptionStatusNotConsiderDeletedAtQuery(memberId = memberId, workbookId = subTargetWorkbookId) ) when {