Skip to content

Commit

Permalink
fix: noticeSearchDto에도 private 추가 (#131)
Browse files Browse the repository at this point in the history
* fix: noticeSearchDto에도 private 추가

* fix: json 추가

* fix: 수정 및 추가

* fix: 수정
  • Loading branch information
skfotakf authored Sep 18, 2023
1 parent 8ad3fc8 commit 5be02b7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 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 @@ -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

0 comments on commit 5be02b7

Please sign in to comment.