diff --git a/src/main/kotlin/com/psr/psr/cs/controller/CsController.kt b/src/main/kotlin/com/psr/psr/cs/controller/CsController.kt index ad0b322..0134b4e 100644 --- a/src/main/kotlin/com/psr/psr/cs/controller/CsController.kt +++ b/src/main/kotlin/com/psr/psr/cs/controller/CsController.kt @@ -1,9 +1,9 @@ package com.psr.psr.cs.controller -import com.psr.psr.cs.dto.FaqListRes -import com.psr.psr.cs.dto.FaqRes -import com.psr.psr.cs.dto.NoticeListRes -import com.psr.psr.cs.dto.NoticeRes +import com.psr.psr.cs.dto.response.FaqListRes +import com.psr.psr.cs.dto.response.FaqRes +import com.psr.psr.cs.dto.response.NoticeListRes +import com.psr.psr.cs.dto.response.NoticeRes import com.psr.psr.cs.service.CsService import com.psr.psr.global.dto.BaseResponse import org.springframework.web.bind.annotation.* diff --git a/src/main/kotlin/com/psr/psr/cs/dto/assembler/CsAssembler.kt b/src/main/kotlin/com/psr/psr/cs/dto/assembler/CsAssembler.kt index e948651..3153f1f 100644 --- a/src/main/kotlin/com/psr/psr/cs/dto/assembler/CsAssembler.kt +++ b/src/main/kotlin/com/psr/psr/cs/dto/assembler/CsAssembler.kt @@ -1,9 +1,9 @@ package com.psr.psr.cs.dto.assembler -import com.psr.psr.cs.dto.FaqListRes -import com.psr.psr.cs.dto.FaqRes -import com.psr.psr.cs.dto.NoticeListRes -import com.psr.psr.cs.dto.NoticeRes +import com.psr.psr.cs.dto.response.FaqListRes +import com.psr.psr.cs.dto.response.FaqRes +import com.psr.psr.cs.dto.response.NoticeListRes +import com.psr.psr.cs.dto.response.NoticeRes import com.psr.psr.cs.entity.Faq import com.psr.psr.cs.entity.Notice import org.springframework.stereotype.Component diff --git a/src/main/kotlin/com/psr/psr/cs/dto/FaqListRes.kt b/src/main/kotlin/com/psr/psr/cs/dto/response/FaqListRes.kt similarity index 61% rename from src/main/kotlin/com/psr/psr/cs/dto/FaqListRes.kt rename to src/main/kotlin/com/psr/psr/cs/dto/response/FaqListRes.kt index 1404a55..e3609bb 100644 --- a/src/main/kotlin/com/psr/psr/cs/dto/FaqListRes.kt +++ b/src/main/kotlin/com/psr/psr/cs/dto/response/FaqListRes.kt @@ -1,4 +1,4 @@ -package com.psr.psr.cs.dto +package com.psr.psr.cs.dto.response data class FaqListRes ( val faqLists: List? diff --git a/src/main/kotlin/com/psr/psr/cs/dto/FaqRes.kt b/src/main/kotlin/com/psr/psr/cs/dto/response/FaqRes.kt similarity index 85% rename from src/main/kotlin/com/psr/psr/cs/dto/FaqRes.kt rename to src/main/kotlin/com/psr/psr/cs/dto/response/FaqRes.kt index d77e52c..81e4703 100644 --- a/src/main/kotlin/com/psr/psr/cs/dto/FaqRes.kt +++ b/src/main/kotlin/com/psr/psr/cs/dto/response/FaqRes.kt @@ -1,4 +1,4 @@ -package com.psr.psr.cs.dto +package com.psr.psr.cs.dto.response import com.fasterxml.jackson.annotation.JsonInclude diff --git a/src/main/kotlin/com/psr/psr/cs/dto/NoticeListRes.kt b/src/main/kotlin/com/psr/psr/cs/dto/response/NoticeListRes.kt similarity index 65% rename from src/main/kotlin/com/psr/psr/cs/dto/NoticeListRes.kt rename to src/main/kotlin/com/psr/psr/cs/dto/response/NoticeListRes.kt index a0ca727..9d92900 100644 --- a/src/main/kotlin/com/psr/psr/cs/dto/NoticeListRes.kt +++ b/src/main/kotlin/com/psr/psr/cs/dto/response/NoticeListRes.kt @@ -1,4 +1,4 @@ -package com.psr.psr.cs.dto +package com.psr.psr.cs.dto.response data class NoticeListRes ( val noticeLists: List? diff --git a/src/main/kotlin/com/psr/psr/cs/dto/NoticeRes.kt b/src/main/kotlin/com/psr/psr/cs/dto/response/NoticeRes.kt similarity index 93% rename from src/main/kotlin/com/psr/psr/cs/dto/NoticeRes.kt rename to src/main/kotlin/com/psr/psr/cs/dto/response/NoticeRes.kt index a2e8607..fac8ab0 100644 --- a/src/main/kotlin/com/psr/psr/cs/dto/NoticeRes.kt +++ b/src/main/kotlin/com/psr/psr/cs/dto/response/NoticeRes.kt @@ -1,4 +1,4 @@ -package com.psr.psr.cs.dto +package com.psr.psr.cs.dto.response import com.fasterxml.jackson.annotation.JsonFormat import com.fasterxml.jackson.annotation.JsonInclude diff --git a/src/main/kotlin/com/psr/psr/cs/service/CsService.kt b/src/main/kotlin/com/psr/psr/cs/service/CsService.kt index 1a7e759..6d718a8 100644 --- a/src/main/kotlin/com/psr/psr/cs/service/CsService.kt +++ b/src/main/kotlin/com/psr/psr/cs/service/CsService.kt @@ -1,9 +1,9 @@ package com.psr.psr.cs.service -import com.psr.psr.cs.dto.FaqListRes -import com.psr.psr.cs.dto.FaqRes -import com.psr.psr.cs.dto.NoticeListRes -import com.psr.psr.cs.dto.NoticeRes +import com.psr.psr.cs.dto.response.FaqListRes +import com.psr.psr.cs.dto.response.FaqRes +import com.psr.psr.cs.dto.response.NoticeListRes +import com.psr.psr.cs.dto.response.NoticeRes import com.psr.psr.cs.dto.assembler.CsAssembler import com.psr.psr.cs.entity.FaqType import com.psr.psr.cs.repository.FaqRepository @@ -21,12 +21,12 @@ class CsService( ) { // 공지사항 메인 - fun getNotices() : NoticeListRes{ + fun getNotices() : NoticeListRes { return csAssembler.toNoticeListRes(noticeRepository.findByStatusOrderByCreatedAtDesc(ACTIVE_STATUS)) } // 공지사항 상세 - fun getNotice(noticeId: Long) : NoticeRes{ + fun getNotice(noticeId: Long) : NoticeRes { val notice = noticeRepository.findByIdAndStatus(noticeId, ACTIVE_STATUS) ?: throw BaseException(BaseResponseCode.NOT_FOUND_NOTICE) return csAssembler.toNoticeRes(notice) }