콘텐츠 메인 무료 탭 - 새로운 무료 콘텐츠 테마
- 데이터가 없는 탭은 나오지 않도록 수정
This commit is contained in:
		| @@ -54,7 +54,7 @@ class AudioContentMainTabFreeService( | ||||
|  | ||||
|         val recommendSeriesList = recommendSeriesRepository.getRecommendSeriesList(isAdult = isAdult) | ||||
|  | ||||
|         val themeList = audioContentThemeRepository.getActiveThemeOfContent(isAdult = isAdult) | ||||
|         val themeList = audioContentThemeRepository.getActiveThemeOfContent(isAdult = isAdult, isFree = true) | ||||
|         val newFreeContentList = if (themeList.isNotEmpty()) { | ||||
|             audioContentRepository.findByTheme( | ||||
|                 memberId = member.id!!, | ||||
|   | ||||
| @@ -27,7 +27,7 @@ class AudioContentThemeQueryRepository( | ||||
|             .fetch() | ||||
|     } | ||||
|  | ||||
|     fun getActiveThemeOfContent(isAdult: Boolean = false): List<String> { | ||||
|     fun getActiveThemeOfContent(isAdult: Boolean = false, isFree: Boolean = false): List<String> { | ||||
|         var where = audioContent.isActive.isTrue | ||||
|             .and(audioContentTheme.isActive.isTrue) | ||||
|  | ||||
| @@ -35,6 +35,10 @@ class AudioContentThemeQueryRepository( | ||||
|             where = where.and(audioContent.isAdult.isFalse) | ||||
|         } | ||||
|  | ||||
|         if (isFree) { | ||||
|             where = where.and(audioContent.price.loe(0)) | ||||
|         } | ||||
|  | ||||
|         return queryFactory | ||||
|             .select(audioContentTheme.theme) | ||||
|             .from(audioContent) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user