Merged
Conversation
P1 #10 문제 해결: - 문제: 매일 10:00에 실행되므로 daysSinceCreation % 3 === 0 로직이 불안정 - 3일째 10:00에 3일 경과 (3 % 3 = 0) → 리마인드 발송 - 4일째 10:00에도 여전히 리마인드 발송 가능 해결 방법: 1. fines 테이블에 lastReminderAt 컬럼 추가 2. 리마인드 발송 후 lastReminderAt 업데이트 3. 마지막 리마인드로부터 정확히 3일 경과 시만 재발송 변경 사항: - schema.ts: fines 테이블에 lastReminderAt 컬럼 및 인덱스 추가 - fine-reminder.ts: 필터 로직을 lastReminderAt 기반으로 변경 - fine.service.ts: updateLastReminderAt() 메서드 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Priority 1 문제 해결: 1. 필터 로직 버그 수정 - 이전: createdAt < threeDaysAgo (3일 이전 체크 - 로직 반대) - 수정: now < threeDaysSinceCreation (3일 미경과 제외) 2. NULL 처리 로직 개선 - 이전: !lastReminderAt → 무조건 true (3일 미경과해도 발송) - 수정: !lastReminderAt → 3일 경과 확인 후 return true 변경 사항: - threeDaysAgo 변수 제거 - threeDaysSinceCreation 변수 추가 (createdAt + 3일) - 주석 명확화 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
🎯 Summary
🔴 AS-IS
daysSinceCreation % 3 === 0로직으로 3일 간격 체크daysSinceCreation = 3으로 계산되어 매일 리마인드 발송🟢 TO-BE
fines테이블에lastReminderAt컬럼 추가lastReminderAt타임스탬프 업데이트💬 참고사항
DB 스키마 변경
필터 로직
마이그레이션