fix(explorer): 미래 라이브 포함으로 음수 D+ 노출을 방지한다

This commit is contained in:
2026-02-23 16:51:53 +09:00
parent 2cf797869b
commit fa5e65b432
3 changed files with 9 additions and 2 deletions

View File

@@ -572,6 +572,8 @@ class ExplorerQueryRepository(
.where(
liveRoom.member.id.eq(creatorId)
.and(liveRoom.channelName.isNotNull)
.and(liveRoom.beginDateTime.isNotNull)
.and(liveRoom.beginDateTime.loe(LocalDateTime.now()))
)
.fetchFirst()
}

View File

@@ -225,8 +225,9 @@ class ExplorerService(
).minOrNull()
val debutDate = debutDateTime?.toLocalDate()
val dDay = if (debutDate != null) {
"D+${ChronoUnit.DAYS.between(debutDate, LocalDate.now())}"
val elapsedDebutDays = debutDate?.let { ChronoUnit.DAYS.between(it, LocalDate.now()) }
val dDay = if (elapsedDebutDays != null && elapsedDebutDays >= 0) {
"D+$elapsedDebutDays"
} else {
""
}