功能:支持按通道ID定向发送

This commit is contained in:
xiaowang
2026-03-23 11:38:42 +08:00
parent 997c13c454
commit fb43aae384
11 changed files with 177 additions and 57 deletions
@@ -76,6 +76,7 @@
- 设置默认通道
- 通道健康检查
- 测试发送
- 展示通道 ID,供外围系统在消息体中按需指定
当前支持的通道类型与提供商:
@@ -114,7 +115,27 @@
5. 配置短信/邮件通道
6. 通过“健康检查”和“测试发送”验证配置
## 8. 当前已知说明
## 8. 外围系统调用约定
外围系统仍然通过 MQ 向 `MessageHub` 投递业务消息,不直接调用某个提供商。
- 不传 `channelId`
- `MessageHub` 会按消息类型自动选择当前默认通道
- 传入 `channelId`
- `MessageHub` 会按 `channelType + channelId` 精确匹配通道
- 若通道不存在、类型不匹配或已停用,则直接返回错误
推荐消息体字段:
- `receiver`
- `channelType`
- `msgType`
- `templateCode`
- `templateParams`
- `sourceSystem`
- `uniqueId`
- `channelId` 可选
## 9. 当前已知说明
- 如果未执行 SQL 补丁,管理页可以打开,但通道列表接口会提示缺少 `message_channel_config` 表
- 当前管理页未接入登录鉴权,适合内网管理场景