콘텐츠 메인 단편 탭 - 태그별 추천 단편 태그
- 콘텐츠가 하나 이상 등록되어 있는 태그만 조회되도록 수정
This commit is contained in:
parent
00c705085e
commit
44e3eda145
|
@ -20,6 +20,10 @@ class ContentMainTabTagCurationRepository(
|
||||||
) {
|
) {
|
||||||
fun getTagList(isAdult: Boolean): List<String> {
|
fun getTagList(isAdult: Boolean): List<String> {
|
||||||
var where = contentHashTagCuration.isActive.isTrue
|
var where = contentHashTagCuration.isActive.isTrue
|
||||||
|
.and(audioContent.isActive.isTrue)
|
||||||
|
.and(audioContent.duration.isNotNull)
|
||||||
|
.and(audioContent.limited.isNull)
|
||||||
|
.and(contentHashTagCurationItem.isActive.isTrue)
|
||||||
|
|
||||||
if (!isAdult) {
|
if (!isAdult) {
|
||||||
where = where.and(contentHashTagCuration.isAdult.isFalse)
|
where = where.and(contentHashTagCuration.isAdult.isFalse)
|
||||||
|
@ -28,7 +32,12 @@ class ContentMainTabTagCurationRepository(
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(contentHashTagCuration.tag)
|
.select(contentHashTagCuration.tag)
|
||||||
.from(contentHashTagCuration)
|
.from(contentHashTagCuration)
|
||||||
|
.innerJoin(contentHashTagCurationItem)
|
||||||
|
.on(contentHashTagCurationItem.curation.id.eq(contentHashTagCuration.id))
|
||||||
|
.innerJoin(contentHashTagCurationItem.content, audioContent)
|
||||||
.where(where)
|
.where(where)
|
||||||
|
.groupBy(contentHashTagCuration.id)
|
||||||
|
.having(contentHashTagCurationItem.id.countDistinct().gt(0))
|
||||||
.orderBy(contentHashTagCuration.orders.asc())
|
.orderBy(contentHashTagCuration.orders.asc())
|
||||||
.fetch()
|
.fetch()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue