Skip to content

Commit

Permalink
[fix] 댓글 수 신고글까지 포함
Browse files Browse the repository at this point in the history
  • Loading branch information
MinchoGreenT committed Sep 14, 2024
1 parent 16a6d0e commit 3dd30ce
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ public List<MissionPostVo> getMissionPostList(Long userId, Long farmClubId) {
.from(missionPostReport)
.where(missionPostReport.user.id.eq(userId))
.fetch();
List<Long> reportCommentIds = queryFactory
.select(missionPostCommentReport.missionPostComment.id)
.from(missionPostCommentReport)
.where(missionPostCommentReport.user.id.eq(userId))
.fetch();

return queryFactory
.select(new QMissionPostVo(
Expand All @@ -96,8 +91,7 @@ public List<MissionPostVo> getMissionPostList(Long userId, Long farmClubId) {
.where(missionPostLike.missionPost.eq(missionPost)),
JPAExpressions.select(missionPostComment.count())
.from(missionPostComment)
.where(missionPostComment.missionPost.eq(missionPost)
.and(missionPostComment.id.notIn(reportCommentIds))),
.where(missionPostComment.missionPost.eq(missionPost)),
JPAExpressions.selectOne()
.from(missionPostLike)
.where(missionPostLike.missionPost.eq(missionPost)
Expand Down

0 comments on commit 3dd30ce

Please sign in to comment.