Files
douyi_guaji_main/douyin/core
CodexandClaude Opus 4.7 4f042f95cd refactor(fudai): 抽 _handle_in_fudai_detail 步骤4"参与成功后处理"块到 handle_attend_success_post_processing
将参与成功后的清理逻辑(约 90 行)抽到
fudai_detail_helpers.handle_attend_success_post_processing。逻辑:
- 检查 _last_successful_attend_ts 是否更新
- 从 detail 提取倒计时
- 设置 _waiting_for_lottery_result / _lottery_result_expected_ts
- 调用 handle_reservation_after_attend_success
- 关闭详情页(如未由 attend_choujiang 关闭)
- 清除标志 + 写步骤4完成日志

顺带删除了 1984-1996 行重复 2 次的"清除第一次读取标志"块。

douyin_fudai.py: 2102 → 2020 行 (-82)
fudai_detail_helpers.py: 1678 → 1769 行

douyin_fudai.py 跌破 2100 行(4121 → 2020,本会话累计削减 2101 行 = -51%)

验证:
- pytest 1013 passed
- compile OK

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 11:59:18 +08:00
..