异常回访提交
This commit is contained in:
@@ -139,11 +139,12 @@ class CommonModule:
|
||||
|
||||
# 获取指定天数前的日期
|
||||
now_time = datetime.now()
|
||||
|
||||
target_time = now_time + timedelta(days=-days_back)
|
||||
target_date_id = int(target_time.strftime('%Y%m%d')) # 获取目标日期
|
||||
|
||||
# sql语句查询
|
||||
sql = f"""SELECT * FROM "public"."holo_ads_dataservice_saas_org_health_warning" WHERE "pt" = '{target_date_id}' and "org_type" = '一般';"""
|
||||
sql = f"""-- SELECT * FROM "public"."holo_ads_dataservice_saas_org_health_warning" WHERE "pt" = '{target_date_id}' and "org_type" = '一般';"""
|
||||
|
||||
# 执行语句并获取结果集
|
||||
cursor.execute(sql)
|
||||
@@ -165,6 +166,7 @@ class CommonModule:
|
||||
cursor.close()
|
||||
conn.close()
|
||||
|
||||
|
||||
return data_yichang
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user