테스트(6월 검증) 완료 후 원래 규칙으로 복구. 전월 소급 파밍 방지. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -267,10 +267,8 @@ public class AccountService {
|
||||
private void awardIfMonthComplete(java.time.LocalDate entryDate, Long memberId) {
|
||||
if (entryDate == null) return;
|
||||
try {
|
||||
// [임시 테스트] 전월(예: 6월) 완성으로도 검증하려고 '현재 월만' 제한을 잠시 해제.
|
||||
// 테스트 후 아래 주석 해제해 '전 월 제외'로 복구할 것.
|
||||
// java.time.LocalDate today = java.time.LocalDate.now();
|
||||
// if (entryDate.getYear() != today.getYear() || entryDate.getMonthValue() != today.getMonthValue()) return;
|
||||
java.time.LocalDate today = java.time.LocalDate.now();
|
||||
if (entryDate.getYear() != today.getYear() || entryDate.getMonthValue() != today.getMonthValue()) return;
|
||||
int recorded = mapper.countDistinctEntryDays(memberId, entryDate.getYear(), entryDate.getMonthValue());
|
||||
if (recorded >= entryDate.lengthOfMonth()) {
|
||||
pointService.awardMonthComplete(memberId, entryDate.getYear(), entryDate.getMonthValue());
|
||||
|
||||
Reference in New Issue
Block a user