test #329

Merged
klaus merged 5 commits from test into main 2025-07-14 17:57:26 +00:00
3 changed files with 13 additions and 5 deletions
Showing only changes of commit 0d2daf4d2c - Show all commits

View File

@ -10,7 +10,6 @@ import kr.co.vividnext.sodalive.content.series.ContentSeriesService
import kr.co.vividnext.sodalive.content.series.GetSeriesListResponse
import kr.co.vividnext.sodalive.content.theme.AudioContentThemeService
import kr.co.vividnext.sodalive.creator.admin.content.series.SeriesPublishedDaysOfWeek
import kr.co.vividnext.sodalive.event.EventService
import kr.co.vividnext.sodalive.event.GetEventResponse
import kr.co.vividnext.sodalive.explorer.ExplorerQueryRepository
import kr.co.vividnext.sodalive.live.room.LiveRoomService
@ -30,7 +29,6 @@ import java.time.temporal.TemporalAdjusters
@Service
class HomeService(
private val eventService: EventService,
private val memberService: MemberService,
private val liveRoomService: LiveRoomService,
private val auditionService: AuditionService,

View File

@ -60,7 +60,13 @@ class RecommendChannelQueryRepository(
.fetch()
}
fun getContentsByCreatorIdLikeDesc(creatorId: Long): List<RecommendChannelContentItem> {
fun getContentsByCreatorIdLikeDesc(creatorId: Long, isAdult: Boolean): List<RecommendChannelContentItem> {
var where = audioContent.member.id.eq(creatorId)
if (!isAdult) {
where = where.and(audioContent.isAdult.isFalse)
}
return queryFactory
.select(
QRecommendChannelContentItem(
@ -82,7 +88,7 @@ class RecommendChannelQueryRepository(
audioContentComment.audioContent.id.eq(audioContent.id)
.and(audioContentComment.isActive.isTrue)
)
.where(audioContent.member.id.eq(creatorId))
.where(where)
.groupBy(audioContent.id)
.orderBy(audioContentLike.id.countDistinct().desc())
.limit(3)

View File

@ -23,7 +23,11 @@ class RecommendChannelQueryService(private val repository: RecommendChannelQuery
)
return recommendChannelList.map {
it.contentList = repository.getContentsByCreatorIdLikeDesc(it.channelId)
it.contentList = repository.getContentsByCreatorIdLikeDesc(
creatorId = it.channelId,
isAdult = isAdult
)
it
}
}