fix: 修复6个数据和代码问题
1. 修复 _generate_plain_summary position key 不匹配 (20d→d20, pct→range_pct) 2. 修复 mairui_api.py 日期解析不一致及 float(None) 崩溃风险 3. 修复 fund_flow_analyzer.py 麦蕊回退数据 close_price=0 导致量价背离误判 4. 修复 db_get_fund_flow_history 缺少完整字段和日期过滤 5. 修复 scheduler.py 连接池泄漏 (conn.close() → put_db(conn)) 6. 修复多处北交所股票代码映射缺失 (8/9开头→bj)
This commit is contained in:
@@ -962,8 +962,8 @@ def _generate_plain_summary(price, change_pct, ma_trend, position, supports,
|
||||
parts.append(trend_desc + '。')
|
||||
|
||||
# 2. 价格位置(用大白话)
|
||||
pos_20 = position.get('20d', {})
|
||||
pct_20 = pos_20.get('pct', 50)
|
||||
pos_20 = position.get('d20', {})
|
||||
pct_20 = pos_20.get('range_pct', 50)
|
||||
if pct_20 > 80:
|
||||
parts.append(f'当前股价处于近20天的高位区间({pct_20:.0f}%位置),已经涨了不少,追高要小心。')
|
||||
elif pct_20 > 50:
|
||||
|
||||
Reference in New Issue
Block a user