feat(overdue): 催繳改為每日提醒,直到全部繳完 (#48) - #49
Merged
Merged
Conversation
把逾期催繳的去重鍵從「每期一次」改為「每期每日一次」: - notification_logs 新增 event 欄('' = 整期 slot;逾期列帶台北營業日) - sendOverdueForPeriod 的 cron 路徑以當日日期為 slot,隔天會再催 - 送失敗仍釋放當日 slot、誠實回報,admin 手動催繳維持整期 slot 不變 - 收回本期開繳仍清空該期所有逾期列 測試 349 → 353,新增 overdue-daily.test.ts
- force 催繳只清 '' 整期 slot,不再誤刪 cron 的每日 slot(同日重試仍去重) - 送失敗改用「以 claim 回傳的 row id 釋放」,避免併發 force 互相刪到 slot - 補測試:cron→force→同日 cron 不重送、失敗釋放、retract 清空多日 slot - README 測試數 353→355、migrations 範圍 0005→0006
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.
需求(#48)
進入催繳時間後,原本「每期只提醒一次」改為每日提醒,直到該期所有人都繳費完成自動停止。
變更
notification_logs新增event欄(''= 整期 slot;逾期列帶台北營業日),UNIQUE 含event(遷移0006_overdue_daily.sql,重建表)sendOverdueForPeriodcron 路徑以當日日期為去重鍵:隔天再催、同日去重、全部繳完回none_due自動停測試
349 → 355 全綠,
tsc --noEmit乾淨。新增overdue-daily.test.ts6 案例(隔天再催/同日去重/繳完停止/cron 連續兩天/force 不誤刪 cron slot/失敗釋放),並擴充 retract 測試覆蓋多日期 slot 清空。審查
Codex 跨引擎審查一次(DO-NOT-MERGE → 三項發現全修,第二次驗證通過)。