Compare commits
No commits in common. "d0178d551cc1441d3736f1e507a9fd450fe653f2" and "827333108d9e27f5dd19646a1f26923db796806b" have entirely different histories.
d0178d551c
...
827333108d
|
@ -89,8 +89,8 @@ class AudioContentMainTabContentService(
|
||||||
endDate = dailyRankingEndDate
|
endDate = dailyRankingEndDate
|
||||||
)
|
)
|
||||||
|
|
||||||
val likeCountRankContentList = if (contentRankCreatorList.isNotEmpty()) {
|
val salesCountRankContentList = if (contentRankCreatorList.isNotEmpty()) {
|
||||||
rankingService.fetchCreatorContentByLikeCountTop4(
|
rankingService.fetchCreatorContentBySalesCountTop4(
|
||||||
creatorId = contentRankCreatorList[0].creatorId,
|
creatorId = contentRankCreatorList[0].creatorId,
|
||||||
isAdult = member.auth != null
|
isAdult = member.auth != null
|
||||||
)
|
)
|
||||||
|
@ -129,8 +129,7 @@ class AudioContentMainTabContentService(
|
||||||
rankSortTypeList = listOf("매출", "댓글", "좋아요"),
|
rankSortTypeList = listOf("매출", "댓글", "좋아요"),
|
||||||
rankContentList = rankContentList,
|
rankContentList = rankContentList,
|
||||||
contentRankCreatorList = contentRankCreatorList,
|
contentRankCreatorList = contentRankCreatorList,
|
||||||
likeCountRankContentList = likeCountRankContentList,
|
salesCountRankContentList = salesCountRankContentList,
|
||||||
salesCountRankContentList = likeCountRankContentList,
|
|
||||||
eventBannerList = eventBannerList,
|
eventBannerList = eventBannerList,
|
||||||
tagList = tagList,
|
tagList = tagList,
|
||||||
tagCurationContentList = tagCurationContentList,
|
tagCurationContentList = tagCurationContentList,
|
||||||
|
@ -196,7 +195,7 @@ class AudioContentMainTabContentService(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
|
fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
|
||||||
return rankingService.fetchCreatorContentByLikeCountTop4(
|
return rankingService.fetchCreatorContentBySalesCountTop4(
|
||||||
creatorId = creatorId,
|
creatorId = creatorId,
|
||||||
isAdult = isAdult
|
isAdult = isAdult
|
||||||
)
|
)
|
||||||
|
|
|
@ -15,7 +15,6 @@ data class GetContentMainTabContentResponse(
|
||||||
val rankSortTypeList: List<String>,
|
val rankSortTypeList: List<String>,
|
||||||
val rankContentList: List<GetAudioContentRankingItem>,
|
val rankContentList: List<GetAudioContentRankingItem>,
|
||||||
val contentRankCreatorList: List<ContentCreatorResponse>,
|
val contentRankCreatorList: List<ContentCreatorResponse>,
|
||||||
val likeCountRankContentList: List<GetAudioContentRankingItem>,
|
|
||||||
val salesCountRankContentList: List<GetAudioContentRankingItem>,
|
val salesCountRankContentList: List<GetAudioContentRankingItem>,
|
||||||
val eventBannerList: GetEventResponse,
|
val eventBannerList: GetEventResponse,
|
||||||
val tagList: List<String>,
|
val tagList: List<String>,
|
||||||
|
|
|
@ -537,43 +537,4 @@ class RankingRepository(
|
||||||
.limit(4)
|
.limit(4)
|
||||||
.fetch()
|
.fetch()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun fetchCreatorContentByLikeCountTop4(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
|
|
||||||
var where = member.isActive.isTrue
|
|
||||||
.and(member.id.eq(creatorId))
|
|
||||||
.and(member.role.eq(MemberRole.CREATOR))
|
|
||||||
.and(audioContent.isActive.isTrue)
|
|
||||||
.and(audioContent.duration.isNotNull)
|
|
||||||
.and(audioContent.limited.isNull)
|
|
||||||
.and(audioContentLike.isActive.isTrue)
|
|
||||||
|
|
||||||
if (!isAdult) {
|
|
||||||
where = where.and(audioContent.isAdult.isFalse)
|
|
||||||
}
|
|
||||||
|
|
||||||
return queryFactory
|
|
||||||
.select(
|
|
||||||
QGetAudioContentRankingItem(
|
|
||||||
audioContent.id,
|
|
||||||
audioContent.title,
|
|
||||||
audioContent.coverImage.prepend("/").prepend(imageHost),
|
|
||||||
audioContentTheme.theme,
|
|
||||||
audioContent.price,
|
|
||||||
audioContent.duration,
|
|
||||||
member.id,
|
|
||||||
member.nickname,
|
|
||||||
member.profileImage.prepend("/").prepend(imageHost)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.from(audioContentLike)
|
|
||||||
.innerJoin(audioContentLike.audioContent, audioContent)
|
|
||||||
.innerJoin(audioContent.theme, audioContentTheme)
|
|
||||||
.innerJoin(audioContent.member, member)
|
|
||||||
.where(where)
|
|
||||||
.groupBy(audioContent.id)
|
|
||||||
.orderBy(audioContentLike.id.count().desc())
|
|
||||||
.offset(0)
|
|
||||||
.limit(4)
|
|
||||||
.fetch()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,10 +193,6 @@ class RankingService(
|
||||||
return repository.fetchCreatorContentBySalesCountTop4(creatorId, isAdult, theme)
|
return repository.fetchCreatorContentBySalesCountTop4(creatorId, isAdult, theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun fetchCreatorContentByLikeCountTop4(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> {
|
|
||||||
return repository.fetchCreatorContentByLikeCountTop4(creatorId, isAdult)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun fetchCreatorBySeriesRevenueRankTop20(
|
fun fetchCreatorBySeriesRevenueRankTop20(
|
||||||
memberId: Long,
|
memberId: Long,
|
||||||
startDate: LocalDateTime,
|
startDate: LocalDateTime,
|
||||||
|
|
Loading…
Reference in New Issue