Skip to content

Commit

Permalink
hotfix: 음식점 영상 중복조회 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
shin-mallang committed Sep 14, 2023
1 parent 735679b commit 95d3e68
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Page<VideoWithCelebQueryResponse> find(
VideoSearchCond videoSearchCond,
Pageable pageable
) {
List<VideoWithCelebQueryResponse> resultList = query.select(
List<VideoWithCelebQueryResponse> resultList = query.selectDistinct(
Projections.constructor(VideoWithCelebQueryResponse.class,
video.id,
video.youtubeUrl,
Expand All @@ -48,7 +48,7 @@ public Page<VideoWithCelebQueryResponse> find(
.limit(pageable.getPageSize())
.fetch();

JPAQuery<Long> countQuery = query.select(video.count())
JPAQuery<Long> countQuery = query.select(video.countDistinct())
.from(video)
.join(celeb).on(celeb.eq(video.celeb))
.where(
Expand Down

0 comments on commit 95d3e68

Please sign in to comment.