fix: close sms scheduling and billing gaps

This commit is contained in:
hectorzhao
2026-07-01 18:56:05 +08:00
parent 8ba4ef8a13
commit f8c9b78c21
28 changed files with 1480 additions and 26 deletions
+36
View File
@@ -90,6 +90,42 @@ npm run test:gateway
| Gateway 未接真实运营商 SMSC | 真实 CMPP 互通仍需联调环境验证。 | 在运营商测试环境补充联调测试报告。 |
| 前端自动化测试缺失 | 当前只有 build smoke,缺少页面级断言。 | 后续补充 Playwright/Vitest smoke 覆盖 dashboard、发送、配置核心页面。 |
## 缺口修复复测追加
本轮已修复或补齐以下原缺口:
- 定时短信:新增计划发送时间、scheduled 状态、取消接口、到点触发和到点重校验。
- 自动计费:发送链路接入余额检查、冻结、扣费、释放、退款和短信计费记录。
- 内容校验:发送前风控接入敏感词和控制字符拦截。
- 企业认证:新增企业认证模型/API,并接入发送前阻断。
- 导入发送:新增客户侧导入预览/确认 API,覆盖重复、非法、黑名单和变量列缺失。
- 配置状态:应用、签名、模板、通道状态变化和应用密钥重置写入系统日志,并影响后续发送校验。
- CMPP 连接状态:新增连接状态模型/API,支持客户/通道维度查询和 dashboard 聚合。
- 接口健壮性:无效 reviewerId/createdById 不再返回数据库外键 500。
已执行复测命令:
```bash
npm run prisma:generate
npm --prefix api test
npm --prefix api run build
npm --prefix api run prisma:migrate:deploy
npm run verify:phase8
npm run test:api
npm run test:gateway
```
最终复测结果:
- `npm run verify:phase8` 通过,BullMQ 15000 条消息、并发 500,端到端 TPS 608.93,满足 500 TPSPrisma generate、API build、前端 build 均通过。
- `npm run test:api` 通过,7 个 test suite、34 个 tests 全部通过。
- `npm run test:gateway` 通过,Go Gateway health、connection、tracker、cmpp、spike 测试全部通过。
当前剩余说明:
- Gateway 仍不连接真实运营商 SMSC,继续使用本地模拟器、mock 回写和契约测试。
- 前端自动化测试仍未新增,当前继续以 build smoke 为主。
## 最终结论
第一版系统化测试第 1 步到第 8 步已全部执行并归档。当前版本在 mock 单元/轻集成、真实环境 smoke、Go Gateway 测试、BullMQ 性能 smoke、API build 和前端 build 层面均通过。