update pay ui
This commit is contained in:
4
app.py
4
app.py
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user