fix(creator): 라이브 다시듣기 첫 콘텐츠 기준을 보정한다
This commit is contained in:
@@ -120,7 +120,7 @@ class DefaultCreatorChannelLiveQueryRepository(
|
||||
): List<CreatorChannelAudioContentRecord> {
|
||||
val rows = findLiveReplayAudioRows(creatorId, viewerId, now, canViewAdultContent, sort, offset, limit)
|
||||
val contentIds = rows.map { itAudioId(it) }
|
||||
val firstContentId = firstLiveReplayAudioContentId(creatorId, now, canViewAdultContent)
|
||||
val firstContentId = firstAudioContentId(creatorId, now, canViewAdultContent)
|
||||
val seriesByContentId = audioSeriesByContentIds(contentIds)
|
||||
val orderStatesByContentId = orderStatesByContentIds(viewerId, contentIds, now)
|
||||
|
||||
@@ -269,7 +269,7 @@ class DefaultCreatorChannelLiveQueryRepository(
|
||||
)
|
||||
}
|
||||
|
||||
private fun firstLiveReplayAudioContentId(
|
||||
private fun firstAudioContentId(
|
||||
creatorId: Long,
|
||||
now: LocalDateTime,
|
||||
canViewAdultContent: Boolean
|
||||
@@ -277,8 +277,15 @@ class DefaultCreatorChannelLiveQueryRepository(
|
||||
return queryFactory
|
||||
.select(audioContent.id)
|
||||
.from(audioContent)
|
||||
.innerJoin(audioContent.theme, audioContentTheme)
|
||||
.where(liveReplayAudioCondition(creatorId, now, canViewAdultContent))
|
||||
.where(
|
||||
audioContent.member.id.eq(creatorId),
|
||||
audioContent.member.isActive.isTrue,
|
||||
audioContent.isActive.isTrue,
|
||||
audioContent.duration.isNotNull,
|
||||
audioContent.releaseDate.isNotNull,
|
||||
audioContent.releaseDate.loe(now),
|
||||
adultAudioCondition(canViewAdultContent)
|
||||
)
|
||||
.orderBy(audioContent.releaseDate.asc(), audioContent.id.asc())
|
||||
.fetchFirst()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user