
richardandClaude
adc7ab52a9
feat(lots): holdings-reminder registry with auto stop/profit & expiry monitoring
新增「持仓提醒」页(/lots),登记买入批次(个股/ETF),每批自动生成并同步两条
监控规则: lot_{id}_p(type=price 止盈止损)与 lot_{id}_d(type=date 到期提醒)。
- 核心监控引擎新增 date 规则类型: 纯日历窗口、每个交易日仅在首个轮询评估一次、
按天 cooldown、跨天清理过期键; 消息按触发当天显示"N天后到期/今日到期"。
- 批次派生规则继承默认 webhook 渠道; 监控中心只读展示(批次/批次托管徽标),
通用 monitor-rules 接口对带 lot_id 的规则写/删返回 409, 避免与批次页脱节。
- 通知正文统一在缺省时追加触发现价与涨跌幅, 并避免与引擎自带引语重复。
- 后端分层: strategy/lots.py 域(校验/存储/批次→规则纯映射) + api/lots.py 薄路由
(写锁/校验先行/级联删规则/复用 _sync_engine 重载); services/fs_utils.py 原子写。
- 前端: api/queryKeys 契约、DateShortcuts、Lots 页(数值输入可留空、加载/出错态、
文案打磨)、Monitor 日期提醒/批次徽标; RuleEditor 不手工建 date(由持仓页生成)。
- 记账/加仓减仓属"交易口径", 不在本改动(issue #230); 到期提醒按自然日窗口,
休市/节假日顺延的交易日历口径待 issue 定夺。
验证: 新增 tests/test_date_rule.py + tests/test_lots.py 全绿(20), 监控族回归通过,
ruff 新文件干净, pnpm build 通过。
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-02 20:20:38 +08:00
..
2026-09-01 22:20:01 +08:00
2026-08-30 19:05:13 +08:00
2026-08-30 19:05:32 +08:00
2026-08-21 17:41:35 +08:00
2026-07-18 18:31:02 +08:00
2026-08-24 17:14:39 +08:00
2026-08-13 20:16:02 +08:00
2026-08-30 19:05:27 +08:00
2026-08-30 19:05:31 +08:00
2026-08-05 17:56:27 +08:00
2026-07-12 13:52:49 +08:00
2026-08-31 22:53:24 +08:00
2026-08-31 22:53:24 +08:00
2026-08-02 10:56:03 +08:00
2026-08-02 10:56:03 +08:00
2026-08-02 10:56:03 +08:00
2026-08-05 17:56:27 +08:00
2026-08-23 19:36:00 +08:00
2026-07-25 22:51:27 +08:00
2026-08-30 19:05:20 +08:00
2026-09-01 13:03:54 +08:00
2026-08-24 14:21:55 +08:00
2026-07-26 18:35:31 +08:00
2026-08-23 19:13:03 +08:00
2026-09-01 22:33:28 +08:00
2026-08-16 23:39:07 +08:00
2026-09-02 20:20:38 +08:00
2026-07-08 13:42:53 +08:00
2026-08-30 19:05:32 +08:00
2026-08-30 19:05:29 +08:00
2026-07-15 21:34:44 +08:00
2026-08-23 19:13:03 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-07-18 00:49:28 +08:00
2026-07-16 14:34:07 +08:00
2026-07-31 19:56:33 +08:00
2026-08-30 18:51:24 +09:00
2026-08-26 00:54:39 +08:00
2026-08-16 23:39:07 +08:00
2026-07-19 16:42:03 +08:00
2026-08-30 19:05:25 +08:00
2026-08-16 23:39:07 +08:00
2026-08-30 19:05:26 +08:00
2026-08-31 16:50:21 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-07-16 12:17:27 +08:00
2026-08-16 23:39:07 +08:00
2026-07-31 19:38:36 +08:00
2026-08-30 22:29:33 +08:00
2026-08-30 22:29:33 +08:00
2026-08-30 19:05:27 +08:00
2026-09-01 22:42:59 +08:00
2026-08-16 23:39:07 +08:00
2026-08-30 19:05:14 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-07-18 00:49:28 +08:00
2026-07-28 09:46:51 +08:00
2026-09-02 20:20:38 +08:00
2026-08-16 23:39:07 +08:00
2026-08-24 17:14:48 +08:00
2026-08-16 23:39:07 +08:00
2026-08-23 17:46:54 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-08-26 13:19:16 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-08-30 19:05:25 +08:00
2026-08-16 23:39:07 +08:00
2026-08-31 22:53:24 +08:00
2026-09-01 13:04:00 +08:00
2026-08-30 19:05:11 +08:00
2026-08-30 19:05:25 +08:00
2026-07-08 12:12:29 +08:00
2026-08-22 20:26:34 +08:00
2026-07-28 21:13:10 +08:00
2026-08-16 23:39:07 +08:00
2026-07-09 17:38:44 +08:00
2026-08-05 17:57:05 +08:00
2026-08-30 18:38:24 +09:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-07-19 09:36:55 +08:00
2026-07-19 10:06:26 +08:00
2026-07-28 21:13:10 +08:00
2026-08-30 19:05:21 +08:00
2026-08-16 23:39:07 +08:00
2026-07-19 10:06:26 +08:00
2026-07-30 13:09:07 +08:00
2026-08-30 19:05:27 +08:00
2026-08-16 23:39:07 +08:00
2026-08-17 16:49:28 +08:00
2026-08-16 23:39:07 +08:00
2026-07-26 18:35:31 +08:00
2026-08-16 23:39:07 +08:00
2026-07-20 13:01:03 +08:00
2026-08-31 22:53:12 +08:00
2026-08-31 16:50:21 +08:00
2026-08-16 23:39:07 +08:00
2026-08-16 23:39:07 +08:00
2026-07-26 18:35:31 +08:00
2026-09-02 10:53:08 +08:00
2026-08-13 20:16:02 +08:00
2026-07-20 13:01:03 +08:00
2026-08-23 19:29:44 +08:00
2026-07-22 11:21:13 +08:00
2026-08-13 20:16:02 +08:00
2026-08-26 09:36:06 +08:00
2026-08-13 20:16:02 +08:00
2026-08-13 20:16:02 +08:00
2026-07-16 12:17:27 +08:00
2026-08-13 20:16:02 +08:00
2026-08-23 19:36:00 +08:00
2026-08-13 20:16:02 +08:00
2026-08-13 20:16:02 +08:00
2026-08-31 22:53:24 +08:00
2026-08-25 14:07:16 +08:00
2026-09-02 14:48:32 +08:00
2026-07-26 18:35:31 +08:00
2026-08-20 16:15:13 +08:00
2026-07-26 12:19:55 +08:00
2026-09-02 13:36:06 +08:00