fix(home): 종료된 라이브 데뷔 판정을 보강한다
This commit is contained in:
@@ -228,8 +228,7 @@ class DefaultHomeRecommendationQueryRepository(
|
||||
union all
|
||||
select lr.member_id as creator_id, lr.begin_date_time as debut_at
|
||||
from live_room lr
|
||||
where lr.is_active = true
|
||||
and lr.channel_name is not null
|
||||
where lr.channel_name is not null
|
||||
and lr.channel_name <> ''
|
||||
and lr.begin_date_time <= :now
|
||||
and (:includeAdultContents = true or lr.is_adult = false)
|
||||
|
||||
@@ -1245,6 +1245,32 @@ class DefaultHomeRecommendationQueryRepositoryTest @Autowired constructor(
|
||||
assertEquals(listOf(newHighScoreCreator.id, newLowScoreCreator.id), creators.map { it.creatorId })
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("최근 데뷔 크리에이터는 종료된 라이브도 채널명이 있으면 라이브 데뷔로 인정한다")
|
||||
fun shouldIncludeEndedLiveWithChannelNameInRecentDebutCreators() {
|
||||
val now = LocalDateTime.of(2026, 5, 31, 10, 0)
|
||||
val endedLiveCreator = saveMember("ended-live-debut", MemberRole.CREATOR)
|
||||
val blankChannelCreator = saveMember("blank-ended-live-debut", MemberRole.CREATOR)
|
||||
|
||||
saveLiveRoom(
|
||||
endedLiveCreator,
|
||||
now.minusDays(5),
|
||||
channelName = "ended-live-channel",
|
||||
isActive = false
|
||||
)
|
||||
saveLiveRoom(
|
||||
blankChannelCreator,
|
||||
now.minusDays(4),
|
||||
channelName = "",
|
||||
isActive = false
|
||||
)
|
||||
flushAndClear()
|
||||
|
||||
val creators = repository.findRecentDebutCreators(now, limit = 10)
|
||||
|
||||
assertEquals(listOf(endedLiveCreator.id), creators.map { it.creatorId })
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("최근 데뷔 크리에이터는 인기 커뮤니티 전용 부스트가 아니라 기존 신규 부스트를 유지한다")
|
||||
fun shouldKeepOriginalNewBoostForRecentDebutCreators() {
|
||||
|
||||
Reference in New Issue
Block a user