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