diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt b/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt index 01683e4e..76b356e2 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/news/database/NewsRepository.kt @@ -69,7 +69,7 @@ class NewsRepositoryImpl( if (!isStaff) { isPrivateBooleanBuilder.or( - QNoticeEntity.noticeEntity.isPrivate.eq(false) + newsEntity.isPrivate.eq(false) ) } diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/news/dto/NewsSearchDto.kt b/src/main/kotlin/com/wafflestudio/csereal/core/news/dto/NewsSearchDto.kt index 2b95ca7c..5deda4e5 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/news/dto/NewsSearchDto.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/news/dto/NewsSearchDto.kt @@ -11,5 +11,5 @@ data class NewsSearchDto @QueryProjection constructor( val date: LocalDateTime?, var tags: List?, var imageURL: String?, - val isPrivate: Boolean + val isPrivate: Boolean, ) diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/NoticeRepository.kt b/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/NoticeRepository.kt index eb94fd7e..0a0776e4 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/NoticeRepository.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/NoticeRepository.kt @@ -77,7 +77,8 @@ class NoticeRepositoryImpl( noticeEntity.title, noticeEntity.createdAt, noticeEntity.isPinned, - noticeEntity.attachments.isNotEmpty + noticeEntity.attachments.isNotEmpty, + noticeEntity.isPrivate ) ) .from(noticeEntity) diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/notice/dto/NoticeSearchDto.kt b/src/main/kotlin/com/wafflestudio/csereal/core/notice/dto/NoticeSearchDto.kt index c093e37c..fb819cba 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/notice/dto/NoticeSearchDto.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/notice/dto/NoticeSearchDto.kt @@ -1,5 +1,6 @@ package com.wafflestudio.csereal.core.notice.dto +import com.fasterxml.jackson.annotation.JsonProperty import com.querydsl.core.annotations.QueryProjection import com.wafflestudio.csereal.core.notice.database.NoticeEntity import java.time.LocalDateTime @@ -10,12 +11,14 @@ data class NoticeSearchDto @QueryProjection constructor( val createdAt: LocalDateTime?, val isPinned: Boolean, val hasAttachment: Boolean, + val isPrivate: Boolean, ) { constructor(entity: NoticeEntity, hasAttachment: Boolean) : this( entity.id, entity.title, entity.createdAt, entity.isPinned, - hasAttachment + hasAttachment, + entity.isPrivate ) } diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/seminar/database/SeminarRepository.kt b/src/main/kotlin/com/wafflestudio/csereal/core/seminar/database/SeminarRepository.kt index 537ff4c3..26d3633a 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/seminar/database/SeminarRepository.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/seminar/database/SeminarRepository.kt @@ -61,7 +61,7 @@ class SeminarRepositoryImpl( if (!isStaff) { isPrivateBooleanBuilder.or( - QNoticeEntity.noticeEntity.isPrivate.eq(false) + seminarEntity.isPrivate.eq(false) ) }