캐릭터 챗봇 #338
|
@ -428,8 +428,10 @@ class ChatRoomService(
|
|||
}
|
||||
}
|
||||
|
||||
// 권고안에 따른 next 계산
|
||||
// 권고안 + 이슈 보정: 채팅 가능(totalRemaining>0)인 경우 next=null
|
||||
val nextForEnter: Long? = when {
|
||||
// 채팅 가능: 유료>0 또는 무료 동시 사용 가능 → next는 표시하지 않음
|
||||
roomStatus.totalRemaining > 0 -> null
|
||||
// roomPaid==0 && roomFree>0 && global<=0 → 글로벌 next
|
||||
roomStatus.remainingPaid == 0 && roomStatus.remainingFree > 0 && globalStatus.totalRemaining <= 0 ->
|
||||
globalStatus.nextRechargeAtEpochMillis
|
||||
|
@ -443,10 +445,7 @@ class ChatRoomService(
|
|||
} else if (globalNext == null) {
|
||||
roomNext
|
||||
} else {
|
||||
maxOf(
|
||||
roomNext,
|
||||
globalNext
|
||||
)
|
||||
maxOf(roomNext, globalNext)
|
||||
}
|
||||
} else {
|
||||
roomNext
|
||||
|
@ -693,6 +692,8 @@ class ChatRoomService(
|
|||
val statusTotalRemaining = roomQuotaAfterConsume.totalRemaining
|
||||
val globalAfter = chatQuotaService.getStatus(member.id!!)
|
||||
val statusNextRechargeAt: Long? = when {
|
||||
// 채팅 가능: totalRemaining>0 → next 표시하지 않음
|
||||
statusTotalRemaining > 0 -> null
|
||||
// totalRemaining==0이고 (global<=0) → max(roomNext, globalNext)
|
||||
statusTotalRemaining == 0 && globalAfter.totalRemaining <= 0 -> {
|
||||
val roomNext = roomQuotaAfterConsume.nextRechargeAtEpochMillis
|
||||
|
|
Loading…
Reference in New Issue