크리에이터 커뮤니티

- where절의 순서를 변경하여 혹시 생길 수 있는 불상사 방지
This commit is contained in:
Klaus 2024-07-10 14:21:28 +09:00
parent bf01bb66e5
commit 77a9f1a13c
1 changed files with 2 additions and 1 deletions

View File

@ -49,12 +49,13 @@ class CreatorCommunityQueryRepositoryImpl(private val queryFactory: JPAQueryFact
isAdult: Boolean isAdult: Boolean
): List<SelectCommunityPostResponse> { ): List<SelectCommunityPostResponse> {
var where = creatorCommunity.isActive.isTrue var where = creatorCommunity.isActive.isTrue
.or(useCan.communityPost.isNotNull)
if (!isAdult) { if (!isAdult) {
where = where.and(creatorCommunity.isAdult.isFalse) where = where.and(creatorCommunity.isAdult.isFalse)
} }
where = where.or(useCan.communityPost.isNotNull)
return queryFactory return queryFactory
.select( .select(
QSelectCommunityPostResponse( QSelectCommunityPostResponse(