parent
81e82ad731
commit
f59f45d9a4
|
@ -72,10 +72,20 @@ class RecommendChannelQueryRepository(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.from(audioContent)
|
.from(audioContent)
|
||||||
.leftJoin(audioContentLike).on(audioContentLike.audioContent.id.eq(audioContent.id))
|
.leftJoin(audioContentLike)
|
||||||
.leftJoin(audioContentComment).on(audioContentComment.audioContent.id.eq(audioContent.id))
|
.on(
|
||||||
|
audioContentLike.audioContent.id.eq(audioContent.id)
|
||||||
|
.and(audioContentLike.isActive.isTrue)
|
||||||
|
)
|
||||||
|
.leftJoin(audioContentComment)
|
||||||
|
.on(
|
||||||
|
audioContentComment.audioContent.id.eq(audioContent.id)
|
||||||
|
.and(audioContentComment.isActive.isTrue)
|
||||||
|
)
|
||||||
.where(audioContent.member.id.eq(creatorId))
|
.where(audioContent.member.id.eq(creatorId))
|
||||||
.groupBy(audioContent.id)
|
.groupBy(audioContent.id)
|
||||||
|
.orderBy(audioContentLike.id.countDistinct().desc())
|
||||||
|
.limit(3)
|
||||||
.fetch()
|
.fetch()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue