콘텐츠 메인 - 채널별 ** 콘텐츠
- 매출 순위 제거
This commit is contained in:
		| @@ -1,8 +0,0 @@ | ||||
| package kr.co.vividnext.sodalive.content.main.tab | ||||
|  | ||||
| import kr.co.vividnext.sodalive.content.main.GetAudioContentRankingItem | ||||
|  | ||||
| data class GetPopularContentByCreatorResponse( | ||||
|     val salesRankContentList: List<GetAudioContentRankingItem>, | ||||
|     val salesCountRankContentList: List<GetAudioContentRankingItem> | ||||
| ) | ||||
| @@ -2,11 +2,11 @@ package kr.co.vividnext.sodalive.content.main.tab.asmr | ||||
|  | ||||
| import kr.co.vividnext.sodalive.content.AudioContentRepository | ||||
| import kr.co.vividnext.sodalive.content.ContentType | ||||
| import kr.co.vividnext.sodalive.content.main.GetAudioContentRankingItem | ||||
| import kr.co.vividnext.sodalive.content.main.banner.AudioContentBannerService | ||||
| import kr.co.vividnext.sodalive.content.main.curation.AudioContentCurationQueryRepository | ||||
| import kr.co.vividnext.sodalive.content.main.tab.AudioContentMainTabRepository | ||||
| import kr.co.vividnext.sodalive.content.main.tab.GetContentCurationResponse | ||||
| import kr.co.vividnext.sodalive.content.main.tab.GetPopularContentByCreatorResponse | ||||
| import kr.co.vividnext.sodalive.event.EventService | ||||
| import kr.co.vividnext.sodalive.member.Member | ||||
| import kr.co.vividnext.sodalive.rank.RankingService | ||||
| @@ -68,16 +68,6 @@ class AudioContentMainTabAsmrService( | ||||
|             minCount = 4 | ||||
|         ) | ||||
|  | ||||
|         val salesRankContentList = if (creatorList.isNotEmpty()) { | ||||
|             rankingService.fetchCreatorContentBySalesTop2( | ||||
|                 creatorId = creatorList[0].creatorId, | ||||
|                 isAdult = isAdult, | ||||
|                 theme = theme | ||||
|             ) | ||||
|         } else { | ||||
|             emptyList() | ||||
|         } | ||||
|  | ||||
|         val salesCountRankContentList = if (creatorList.isNotEmpty()) { | ||||
|             rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|                 creatorId = creatorList[0].creatorId, | ||||
| @@ -107,30 +97,17 @@ class AudioContentMainTabAsmrService( | ||||
|             newAsmrContentList = newAsmrContentList, | ||||
|             rankAsmrContentList = rankAsmrContentList, | ||||
|             creatorList = creatorList, | ||||
|             salesRankContentList = salesRankContentList, | ||||
|             salesCountRankContentList = salesCountRankContentList, | ||||
|             eventBannerList = eventBannerList, | ||||
|             curationList = curationList | ||||
|         ) | ||||
|     } | ||||
|  | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): GetPopularContentByCreatorResponse { | ||||
|         val theme = "ASMR" | ||||
|         val salesRankContentList = rankingService.fetchCreatorContentBySalesTop2( | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> { | ||||
|         return rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult, | ||||
|             theme = theme | ||||
|         ) | ||||
|  | ||||
|         val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult, | ||||
|             theme = theme | ||||
|         ) | ||||
|  | ||||
|         return GetPopularContentByCreatorResponse( | ||||
|             salesRankContentList = salesRankContentList, | ||||
|             salesCountRankContentList = salesCountRankContentList | ||||
|             theme = "ASMR" | ||||
|         ) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -13,7 +13,6 @@ data class GetContentMainTabAsmrResponse( | ||||
|     val newAsmrContentList: List<GetAudioContentMainItem>, | ||||
|     val rankAsmrContentList: List<GetAudioContentRankingItem>, | ||||
|     val creatorList: List<ContentCreatorResponse>, | ||||
|     val salesRankContentList: List<GetAudioContentRankingItem>, | ||||
|     val salesCountRankContentList: List<GetAudioContentRankingItem>, | ||||
|     val eventBannerList: GetEventResponse, | ||||
|     val curationList: List<GetContentCurationResponse> | ||||
|   | ||||
| @@ -5,7 +5,6 @@ import kr.co.vividnext.sodalive.content.ContentType | ||||
| import kr.co.vividnext.sodalive.content.main.GetAudioContentMainItem | ||||
| import kr.co.vividnext.sodalive.content.main.GetAudioContentRankingItem | ||||
| import kr.co.vividnext.sodalive.content.main.banner.AudioContentBannerService | ||||
| import kr.co.vividnext.sodalive.content.main.tab.GetPopularContentByCreatorResponse | ||||
| import kr.co.vividnext.sodalive.content.theme.AudioContentThemeQueryRepository | ||||
| import kr.co.vividnext.sodalive.event.EventService | ||||
| import kr.co.vividnext.sodalive.member.Member | ||||
| @@ -75,15 +74,6 @@ class AudioContentMainTabContentService( | ||||
|             endDate = dailyRankingEndDate | ||||
|         ) | ||||
|  | ||||
|         val salesRankContentList = if (contentRankCreatorList.isNotEmpty()) { | ||||
|             rankingService.fetchCreatorContentBySalesTop2( | ||||
|                 creatorId = contentRankCreatorList[0].creatorId, | ||||
|                 isAdult = member.auth != null | ||||
|             ) | ||||
|         } else { | ||||
|             emptyList() | ||||
|         } | ||||
|  | ||||
|         val salesCountRankContentList = if (contentRankCreatorList.isNotEmpty()) { | ||||
|             rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|                 creatorId = contentRankCreatorList[0].creatorId, | ||||
| @@ -100,7 +90,6 @@ class AudioContentMainTabContentService( | ||||
|             rankSortTypeList = listOf("매출", "댓글", "좋아요"), | ||||
|             rankContentList = rankContentList, | ||||
|             contentRankCreatorList = contentRankCreatorList, | ||||
|             salesRankContentList = salesRankContentList, | ||||
|             salesCountRankContentList = salesCountRankContentList, | ||||
|             eventBannerList = eventBannerList | ||||
|         ) | ||||
| @@ -144,20 +133,10 @@ class AudioContentMainTabContentService( | ||||
|         ) | ||||
|     } | ||||
|  | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): GetPopularContentByCreatorResponse { | ||||
|         val salesRankContentList = rankingService.fetchCreatorContentBySalesTop2( | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> { | ||||
|         return rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult | ||||
|         ) | ||||
|  | ||||
|         val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult | ||||
|         ) | ||||
|  | ||||
|         return GetPopularContentByCreatorResponse( | ||||
|             salesRankContentList = salesRankContentList, | ||||
|             salesCountRankContentList = salesCountRankContentList | ||||
|         ) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -14,7 +14,6 @@ data class GetContentMainTabContentResponse( | ||||
|     val rankSortTypeList: List<String>, | ||||
|     val rankContentList: List<GetAudioContentRankingItem>, | ||||
|     val contentRankCreatorList: List<ContentCreatorResponse>, | ||||
|     val salesRankContentList: List<GetAudioContentRankingItem>, | ||||
|     val salesCountRankContentList: List<GetAudioContentRankingItem>, | ||||
|     val eventBannerList: GetEventResponse | ||||
| ) | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package kr.co.vividnext.sodalive.content.main.tab.home | ||||
|  | ||||
| import kr.co.vividnext.sodalive.content.main.GetAudioContentRankingItem | ||||
| import kr.co.vividnext.sodalive.content.main.banner.AudioContentBannerService | ||||
| import kr.co.vividnext.sodalive.content.main.tab.GetPopularContentByCreatorResponse | ||||
| import kr.co.vividnext.sodalive.event.EventService | ||||
| import kr.co.vividnext.sodalive.member.Member | ||||
| import kr.co.vividnext.sodalive.notice.ServiceNoticeService | ||||
| @@ -105,20 +105,10 @@ class AudioContentMainTabHomeService( | ||||
|         ) | ||||
|     } | ||||
|  | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): GetPopularContentByCreatorResponse { | ||||
|         val salesRankContentList = rankingService.fetchCreatorContentBySalesTop2( | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> { | ||||
|         return rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult | ||||
|         ) | ||||
|  | ||||
|         val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult | ||||
|         ) | ||||
|  | ||||
|         return GetPopularContentByCreatorResponse( | ||||
|             salesRankContentList = salesRankContentList, | ||||
|             salesCountRankContentList = salesCountRankContentList | ||||
|         ) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -2,11 +2,11 @@ package kr.co.vividnext.sodalive.content.main.tab.replay | ||||
|  | ||||
| import kr.co.vividnext.sodalive.content.AudioContentRepository | ||||
| import kr.co.vividnext.sodalive.content.ContentType | ||||
| import kr.co.vividnext.sodalive.content.main.GetAudioContentRankingItem | ||||
| import kr.co.vividnext.sodalive.content.main.banner.AudioContentBannerService | ||||
| import kr.co.vividnext.sodalive.content.main.curation.AudioContentCurationQueryRepository | ||||
| import kr.co.vividnext.sodalive.content.main.tab.AudioContentMainTabRepository | ||||
| import kr.co.vividnext.sodalive.content.main.tab.GetContentCurationResponse | ||||
| import kr.co.vividnext.sodalive.content.main.tab.GetPopularContentByCreatorResponse | ||||
| import kr.co.vividnext.sodalive.event.EventService | ||||
| import kr.co.vividnext.sodalive.member.Member | ||||
| import kr.co.vividnext.sodalive.rank.RankingService | ||||
| @@ -68,16 +68,6 @@ class AudioContentMainTabLiveReplayService( | ||||
|             minCount = 4 | ||||
|         ) | ||||
|  | ||||
|         val salesRankContentList = if (creatorList.isNotEmpty()) { | ||||
|             rankingService.fetchCreatorContentBySalesTop2( | ||||
|                 creatorId = creatorList[0].creatorId, | ||||
|                 isAdult = isAdult, | ||||
|                 theme = theme | ||||
|             ) | ||||
|         } else { | ||||
|             emptyList() | ||||
|         } | ||||
|  | ||||
|         val salesCountRankContentList = if (creatorList.isNotEmpty()) { | ||||
|             rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|                 creatorId = creatorList[0].creatorId, | ||||
| @@ -107,30 +97,17 @@ class AudioContentMainTabLiveReplayService( | ||||
|             newLiveReplayContentList = newLiveReplayContentList, | ||||
|             rankLiveReplayContentList = rankLiveReplayContentList, | ||||
|             creatorList = creatorList, | ||||
|             salesRankContentList = salesRankContentList, | ||||
|             salesCountRankContentList = salesCountRankContentList, | ||||
|             eventBannerList = eventBannerList, | ||||
|             curationList = curationList | ||||
|         ) | ||||
|     } | ||||
|  | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): GetPopularContentByCreatorResponse { | ||||
|         val theme = "다시듣기" | ||||
|         val salesRankContentList = rankingService.fetchCreatorContentBySalesTop2( | ||||
|     fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): List<GetAudioContentRankingItem> { | ||||
|         return rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult, | ||||
|             theme = theme | ||||
|         ) | ||||
|  | ||||
|         val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop4( | ||||
|             creatorId = creatorId, | ||||
|             isAdult = isAdult, | ||||
|             theme = theme | ||||
|         ) | ||||
|  | ||||
|         return GetPopularContentByCreatorResponse( | ||||
|             salesRankContentList = salesRankContentList, | ||||
|             salesCountRankContentList = salesCountRankContentList | ||||
|             theme = "다시듣기" | ||||
|         ) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -13,7 +13,6 @@ data class GetContentMainTabLiveReplayResponse( | ||||
|     val newLiveReplayContentList: List<GetAudioContentMainItem>, | ||||
|     val rankLiveReplayContentList: List<GetAudioContentRankingItem>, | ||||
|     val creatorList: List<ContentCreatorResponse>, | ||||
|     val salesRankContentList: List<GetAudioContentRankingItem>, | ||||
|     val salesCountRankContentList: List<GetAudioContentRankingItem>, | ||||
|     val eventBannerList: GetEventResponse, | ||||
|     val curationList: List<GetContentCurationResponse> | ||||
|   | ||||
| @@ -381,54 +381,6 @@ class RankingRepository( | ||||
|             .fetch() | ||||
|     } | ||||
|  | ||||
|     fun fetchCreatorContentBySalesTop2( | ||||
|         creatorId: Long, | ||||
|         isAdult: Boolean, | ||||
|         theme: String | ||||
|     ): List<GetAudioContentRankingItem> { | ||||
|         var where = member.isActive.isTrue | ||||
|             .and(member.role.eq(MemberRole.CREATOR)) | ||||
|             .and(audioContent.isActive.isTrue) | ||||
|             .and(audioContent.duration.isNotNull) | ||||
|             .and(audioContent.limited.isNull) | ||||
|             .and(audioContentTheme.isActive.isTrue) | ||||
|             .and(order.isActive.isTrue) | ||||
|             .and(member.id.eq(creatorId)) | ||||
|  | ||||
|         if (!isAdult) { | ||||
|             where = where.and(series.isAdult.isFalse) | ||||
|         } | ||||
|  | ||||
|         if (theme.isNotBlank()) { | ||||
|             where = where.and(audioContentTheme.theme.eq(theme)) | ||||
|         } | ||||
|  | ||||
|         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(order) | ||||
|             .innerJoin(order.audioContent, audioContent) | ||||
|             .innerJoin(audioContent.theme, audioContentTheme) | ||||
|             .innerJoin(audioContent.member, member) | ||||
|             .where(where) | ||||
|             .groupBy(audioContent.id) | ||||
|             .orderBy(order.can.sum().desc()) | ||||
|             .offset(0) | ||||
|             .limit(2) | ||||
|             .fetch() | ||||
|     } | ||||
|  | ||||
|     fun fetchCreatorContentBySalesCountTop4( | ||||
|         creatorId: Long, | ||||
|         isAdult: Boolean, | ||||
|   | ||||
| @@ -189,14 +189,6 @@ class RankingService( | ||||
|         return repository.fetchCreatorBySellContentCountRankTop20(memberId, startDate, endDate) | ||||
|     } | ||||
|  | ||||
|     fun fetchCreatorContentBySalesTop2( | ||||
|         creatorId: Long, | ||||
|         isAdult: Boolean, | ||||
|         theme: String = "" | ||||
|     ): List<GetAudioContentRankingItem> { | ||||
|         return repository.fetchCreatorContentBySalesTop2(creatorId, isAdult, theme) | ||||
|     } | ||||
|  | ||||
|     fun fetchCreatorContentBySalesCountTop4( | ||||
|         creatorId: Long, | ||||
|         isAdult: Boolean, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user