feat(home): 최근 활동 이동 식별자를 보강한다

This commit is contained in:
2026-07-30 14:42:46 +09:00
parent b30447f004
commit e6f56f24fe
10 changed files with 456 additions and 20 deletions

View File

@@ -245,6 +245,7 @@ class HomeRecommendationFacade(
}
private fun RecentlyActiveCreatorRecord.toItem() = HomeActiveCreatorItem(
creatorId = creatorId,
creatorNickname = creatorNickname,
creatorProfileImage = profileImageUrl(cloudFrontHost, creatorProfileImage),
activityType = activityType.name,

View File

@@ -36,6 +36,7 @@ data class HomeLiveItem(
)
data class HomeActiveCreatorItem(
val creatorId: Long,
val creatorNickname: String,
val creatorProfileImage: String,
val activityType: String,

View File

@@ -127,7 +127,8 @@ class DefaultHomeRecommendationQueryRepository(
includeAdultActivities: Boolean
): List<RecentlyActiveCreatorRecord> {
val sql = """
select ranked.creator_nickname,
select ranked.creator_id,
ranked.creator_nickname,
ranked.creator_profile_image,
ranked.activity_type,
ranked.activity_at,
@@ -144,7 +145,7 @@ class DefaultHomeRecommendationQueryRepository(
m.profile_image as creator_profile_image,
'LIVE' as activity_type,
lr.begin_date_time as activity_at,
null as target_id,
case when lr.is_active = true then lr.id else null end as target_id,
lr.id as target_sort_id
from live_room lr
join member m on m.id = lr.member_id
@@ -199,11 +200,12 @@ class DefaultHomeRecommendationQueryRepository(
return rows.map { row ->
RecentlyActiveCreatorRecord(
creatorNickname = row[0] as String,
creatorProfileImage = row[1] as String?,
activityType = CreatorActivityType.valueOf(row[2] as String),
activityAt = toLocalDateTime(row[3]),
targetId = (row[4] as Number?)?.toLong()
creatorId = (row[0] as Number).toLong(),
creatorNickname = row[1] as String,
creatorProfileImage = row[2] as String?,
activityType = CreatorActivityType.valueOf(row[3] as String),
activityAt = toLocalDateTime(row[4]),
targetId = (row[5] as Number?)?.toLong()
)
}
}

View File

@@ -103,6 +103,7 @@ data class HomeBannerRecommendationRecord(
)
data class RecentlyActiveCreatorRecord(
val creatorId: Long,
val creatorNickname: String,
val creatorProfileImage: String?,
val activityType: CreatorActivityType,