|
@@ -212,9 +212,9 @@ def get_script_config_lst(item: ScriptConfigLst):
|
|
|
end_date = item.end_date + timedelta(days=1)
|
|
|
sql = f"select * from ctop_ai_script_query_word_config where config_id in " \
|
|
|
f"(select distinct(config_id) config_id from ctop_ai_script_query_word_config " \
|
|
|
- f"where start_time >= '{item.start_date}' and start_time < '{end_date}' " \
|
|
|
- f"and ('{item.search_word}' = '' or query_word like '%%{item.search_word}%%') or recommended_word like '%%{item.search_word}%%') " \
|
|
|
- f"and operate_type = 1 and end_time ='9999-12-31'"
|
|
|
+ f"where ('{item.search_word}' = '' or query_word like '%%{item.search_word}%%' or recommended_word like '%%{item.search_word}%%') )" \
|
|
|
+ f"and operate_type = 1 and end_time ='9999-12-31' " \
|
|
|
+ f"and start_time >= '{item.start_date}' and start_time < '{end_date}' "
|
|
|
|
|
|
org_df = pd.read_sql(sql, ai_word_engine)
|
|
|
if not org_df.empty:
|