update pay ui

This commit is contained in:
2025-12-03 13:43:55 +08:00
parent 0fdacbd76a
commit b705cad6fe
5 changed files with 51 additions and 116 deletions

4
app.py
View File

@@ -5601,6 +5601,8 @@ def get_historical_event_stocks(event_id):
if event_trading_date:
try:
# 查询股票在事件对应交易日的数据
# ea_dailyline 表的 seccode 不带后缀,需要去掉 .SH/.SZ 后缀
base_stock_code = stock.stock_code.split('.')[0] if stock.stock_code else ''
with engine.connect() as conn:
query = text("""
SELECT close_price, change_pct
@@ -5612,7 +5614,7 @@ def get_historical_event_stocks(event_id):
""")
result = conn.execute(query, {
'stock_code': stock.stock_code,
'stock_code': base_stock_code,
'trading_date': event_trading_date
}).fetchone()