Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: noticeSearchDto에도 private 추가 #131

Merged
merged 4 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class NewsRepositoryImpl(

if (!isStaff) {
isPrivateBooleanBuilder.or(
QNoticeEntity.noticeEntity.isPrivate.eq(false)
newsEntity.isPrivate.eq(false)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ data class NewsSearchDto @QueryProjection constructor(
val date: LocalDateTime?,
var tags: List<String>?,
var imageURL: String?,
val isPrivate: Boolean
val isPrivate: Boolean,
)
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class NoticeRepositoryImpl(
noticeEntity.title,
noticeEntity.createdAt,
noticeEntity.isPinned,
noticeEntity.attachments.isNotEmpty
noticeEntity.attachments.isNotEmpty,
noticeEntity.isPrivate
)
)
.from(noticeEntity)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SeminarRepositoryImpl(

if (!isStaff) {
isPrivateBooleanBuilder.or(
QNoticeEntity.noticeEntity.isPrivate.eq(false)
seminarEntity.isPrivate.eq(false)
)
}

Expand Down