Commit Graph

6 Commits

Author SHA1 Message Date
yuming 6548577a98 定时任务改为按用户分组、按优先级发送,额度耗尽即停 2026-08-15 18:04:12 +08:00
yuming b1949ac73e 新增 /api/subscribe 接口:授权上报与风险查询
- grantQuota/getQuotaStatus 从 index.js 导出供测试直接调用
- app.listen 加 require.main 守卫,避免测试 require 本文件时
  真的起服务占用端口、cron 定时器让进程无法退出
2026-08-15 17:55:40 +08:00
yuming 3a61b7952b 新增订阅额度风险预警计算 2026-08-15 17:43:19 +08:00
yuming 07ee98f838 修复 consume 缺行不建行导致 sentTotal 丢失的问题 2026-08-15 17:40:31 +08:00
yuming 8d63b47577 新增订阅消息额度记账表与模块 2026-08-15 17:34:46 +08:00
yuming 68acbb3809 抽出日期计算纯函数模块,并搭建后端测试基建
- 新增 server/src/occurrence.js:startOfDay/getNextOccurrence/daysBetween,today 可注入
- reminder.js 改为调用新模块,删除内联的 getThisYearDate/daysBetween
- 引入 node:test 作为测试框架,加 npm test 脚本
- 新增 test/helper.js(临时库辅助,供后续任务用)和 test/occurrence.test.js(7 个用例,覆盖农历跨年等边界)
2026-08-15 17:30:42 +08:00