fix(explorer): 미래 라이브 포함으로 음수 D+ 노출을 방지한다
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user