fix: battle finish/#645#646
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the battle expiration and experience history logic by removing the one-day offset and adopting a duration-based calculation using Instant. The review feedback highlights potential edge cases where a battle ending exactly at midnight could lead to incorrect date inclusion in SQL queries and service-level date conversions. Additionally, it was noted that the zoneId parameter in the Battle.accept method is now redundant and should be removed to improve code cleanliness.
Finefinee
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경사항
Battle.accept(): 배틀 종료 시각을 수락일 자정 기준에서 수락 시각 + N일(72시간 단위)로 변경FindDetailedBattleInfoService,FindAllBattleInfoService:expireDate에서.minusDays(1)제거endAt이 더 이상 자정이 아니므로endAt의 KST 날짜가 곧 마지막 활동일UserExpHistoryJpaRepository.findAverageExpForBattles쿼리:< end_at::date→<= end_at::dateBattleTest,FindAllBattleInfoServiceTest수정관련 이슈
Closes #645
추가 컨텍스트
isExpiredInProgress) 흐름은 변경 없음—
endAt.isBefore(now)판단 기준이 동일하게 유지되므로 자연스럽게 적용됨expireDate가 오늘 날짜로 고정되는 버그를 수정했으나,종료 시각 계산 자체의 의도가 잘못되어 있어 근본 원인을 이번에 수정