Commit Graph

7 Commits

Author SHA1 Message Date
ryan 6f846a0a3c feat: subscribe to RabbitMQ trade signals and notify by rules
Consume configurable queues, format signals (including period), share NotifyService with HTTP, and drop duplicate bodies within 1h.
2026-08-15 17:34:49 +08:00
ryan 1f4fe2fb75 docs: add RabbitMQ subscriber design spec
Lock the notify-service MQ module: configurable subscriptions, trade-signal formatting, and shared NotifyService.
2026-08-15 16:42:30 +08:00
ryan bd8a9ff96d feat: 增加 SafeW 已监控群列表接口
通过 getUpdates 将群写入 Redis,供创建/编辑渠道时选择 chat_id,避免前端重复传递 token。
2026-08-15 00:40:40 +08:00
ryan 0d0cd0c510 feat: 新增 SafeW 出站通知渠道
通过 Bot API sendMessage 投递渲染后的通知,MarkdownV2 自动转义标题与正文。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 00:58:44 +08:00
ryan 39f3774940 feat: 配置列表分页与钉钉机器人分钟级排队限流
统一 sources/templates/channels/rules 列表为分页响应,避免配置增多时全量返回;按钉钉 access_token 限制每分钟发送并在超限时等待下一分钟,降低触发官方封禁风险。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 00:34:26 +08:00
ryan c74bab3033 fix(数据存储): 确保列表查询返回空数组而非 null,并补充 HTTPie/Postman API 文档
Motivation:
当数据库查询无结果时,Go 的 `var slice []Type` 声明会使 JSON 序列化输出 `null`,而非 `[]`。这在 API 响应中造成不一致,也增加了客户端的空值处理负担。改为 `make([]Type, 0)` 后空结果统一输出为 `[]`,提升 API 规范性。

Changes:

* 统一 store 层所有 List 方法使用 `make([]Type, 0)` 初始化切片,覆盖 Sources、Channels、Templates、Rules、MessageLogs 及 RuleChannels 查询
* 新增完整的 cURL 示例文档,覆盖全部 API 端点(通知、Source、Template、Channel、Rule、消息记录)
* 新增 Postman Collection JSON 文件,可直接导入 HTTPie 使用,包含环境变量配置
2026-07-31 22:09:39 +08:00
ryan 976ec3ca70 feat: project scaffold, config loading, skeleton main 2026-06-27 12:57:11 +08:00