update pay ui

This commit is contained in:
2025-12-15 13:44:44 +08:00
parent 4922baa8ad
commit aaca6b47ed
3 changed files with 18 additions and 13 deletions

View File

@@ -5920,7 +5920,6 @@ def api_calendar_events():
fact, \
related_stocks, \
concepts, \
inferred_tag, \
second_modified_text, \
`second_modified_text.1` as second_modified_text_1, \
best_matches
@@ -5947,11 +5946,6 @@ def api_calendar_events():
query += f" AND star IN ({placeholders})"
for i, imp in enumerate(importance_list):
params[f'imp_{i}'] = imp
if category != 'all':
# category参数用于筛选inferred_tag字段如"大周期"、"大消费"等)
query += " AND inferred_tag = :category"
params['category'] = category
# 新增搜索条件
if search_query:
# 使用LIKE进行模糊搜索同时搜索title和related_stocks字段
@@ -5992,9 +5986,6 @@ def api_calendar_events():
elif len(importance_list) > 1:
placeholders = ', '.join([f':imp_{i}' for i in range(len(importance_list))])
count_query += f" AND star IN ({placeholders})"
if category != 'all':
count_query += " AND inferred_tag = :category"
# 新增搜索条件到计数查询
if search_query:
count_query += """ AND (
@@ -6157,11 +6148,9 @@ def api_calendar_events():
'category': {
'event_type': event.type,
'importance': event.star,
'star_rating': star_rating,
'inferred_tag': event.inferred_tag # 添加inferred_tag到返回数据
'star_rating': star_rating
},
'star_rating': star_rating,
'inferred_tag': event.inferred_tag, # 直接返回行业标签
'related_concepts': related_concepts,
'related_stocks': related_stocks_list,
'related_avg_chg': round(related_avg_chg, 2),