Skip to content

Commit ff912b5

Browse files
committed
feat: 공개된 카테고리의 아티클만 공유하도록 기능 수정
1 parent 12b00cf commit ff912b5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

infrastructure/src/main/java/com/pinback/infrastructure/article/repository/ArticleRepositoryCustomImpl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,12 @@ public ArticleCountInfoV3 findAllCountByCategoryV3(UUID userId, long categoryId)
429429
@Override
430430
public SharedArticles findTopListByJob(Job job) {
431431
List<Article> articles = queryFactory.selectFrom(article)
432-
.join(article.user, user)
433-
.where(user.job.eq(job))
432+
.join(article.user, user).fetchJoin()
433+
.join(article.category, category)
434+
.where(
435+
user.job.eq(job),
436+
category.isPublic.isTrue()
437+
)
434438
.orderBy(article.createdAt.desc())
435439
.limit(10)
436440
.fetch();

0 commit comments

Comments
 (0)