fix(recommendation): 전 크리에이터 최근 활동 노출을 제외한다
This commit is contained in:
@@ -154,6 +154,7 @@ class DefaultHomeRecommendationQueryRepository(
|
|||||||
and lr.channel_name <> ''
|
and lr.channel_name <> ''
|
||||||
and (:includeAdultActivities = true or lr.is_adult = false)
|
and (:includeAdultActivities = true or lr.is_adult = false)
|
||||||
and m.is_active = true
|
and m.is_active = true
|
||||||
|
and m.role = 'CREATOR'
|
||||||
union all
|
union all
|
||||||
select m.id as creator_id,
|
select m.id as creator_id,
|
||||||
m.nickname as creator_nickname,
|
m.nickname as creator_nickname,
|
||||||
@@ -169,6 +170,7 @@ class DefaultHomeRecommendationQueryRepository(
|
|||||||
and ac.release_date is not null
|
and ac.release_date is not null
|
||||||
and (:includeAdultActivities = true or ac.is_adult = false)
|
and (:includeAdultActivities = true or ac.is_adult = false)
|
||||||
and m.is_active = true
|
and m.is_active = true
|
||||||
|
and m.role = 'CREATOR'
|
||||||
union all
|
union all
|
||||||
select m.id as creator_id,
|
select m.id as creator_id,
|
||||||
m.nickname as creator_nickname,
|
m.nickname as creator_nickname,
|
||||||
@@ -182,6 +184,7 @@ class DefaultHomeRecommendationQueryRepository(
|
|||||||
where cc.is_active = true
|
where cc.is_active = true
|
||||||
and (:includeAdultActivities = true or cc.is_adult = false)
|
and (:includeAdultActivities = true or cc.is_adult = false)
|
||||||
and m.is_active = true
|
and m.is_active = true
|
||||||
|
and m.role = 'CREATOR'
|
||||||
) activities
|
) activities
|
||||||
) ranked
|
) ranked
|
||||||
where ranked.creator_rank = 1
|
where ranked.creator_rank = 1
|
||||||
|
|||||||
@@ -527,6 +527,23 @@ class DefaultHomeRecommendationQueryRepositoryTest @Autowired constructor(
|
|||||||
assertEquals(CreatorActivityType.COMMUNITY, creators.single().activityType)
|
assertEquals(CreatorActivityType.COMMUNITY, creators.single().activityType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("최근 활동 크리에이터는 현재 크리에이터 역할이 아닌 회원(전 크리에이터)의 활동을 제외한다")
|
||||||
|
fun shouldExcludeNonCreatorRoleMembersFromRecentlyActiveCreators() {
|
||||||
|
val baseAt = LocalDateTime.of(2026, 5, 31, 10, 0)
|
||||||
|
val formerCreator = saveMember("former-creator", MemberRole.USER)
|
||||||
|
val visibleCreator = saveMember("visible-role-creator", MemberRole.CREATOR)
|
||||||
|
saveLiveRoom(formerCreator, baseAt.plusMinutes(2), channelName = "former-creator-channel")
|
||||||
|
val community = saveCommunity(visibleCreator, isCommentAvailable = true)
|
||||||
|
updateCreatedAt("CreatorCommunity", community.id!!, baseAt.plusMinutes(1))
|
||||||
|
flushAndClear()
|
||||||
|
|
||||||
|
val creators = repository.findRecentlyActiveCreators(limit = 10)
|
||||||
|
|
||||||
|
assertEquals(listOf(visibleCreator.nickname), creators.map { it.creatorNickname })
|
||||||
|
assertEquals(CreatorActivityType.COMMUNITY, creators.single().activityType)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("AI 캐릭터 스냅샷은 전날 AI 발화 수, 중복 없는 활성 사용자 수, 신규 팔로우 증가량을 집계한다")
|
@DisplayName("AI 캐릭터 스냅샷은 전날 AI 발화 수, 중복 없는 활성 사용자 수, 신규 팔로우 증가량을 집계한다")
|
||||||
fun shouldFindAiCharacterSnapshotsWithFollowIncrease() {
|
fun shouldFindAiCharacterSnapshotsWithFollowIncrease() {
|
||||||
|
|||||||
Reference in New Issue
Block a user