Skip to content

Commit

Permalink
fix: noticeSearchDto에도 private 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
skfotakf committed Sep 18, 2023
1 parent 8ad3fc8 commit e1179c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
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 @@ -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
Expand Up @@ -10,12 +10,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
)
}

0 comments on commit e1179c8

Please sign in to comment.