From d4a316aaae0f624b946902c6ba148dc9cd4d7717 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Wed, 8 May 2024 19:36:18 +0800 Subject: [PATCH] add bi --- bi/vas_yoy_flow.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/bi/vas_yoy_flow.py b/bi/vas_yoy_flow.py index e2e3140..ef2640b 100644 --- a/bi/vas_yoy_flow.py +++ b/bi/vas_yoy_flow.py @@ -44,15 +44,13 @@ class S: formatted_dt = dt.strftime('%Y-%m-%d 00:00:00') sql_q = "select ptime from vas_day_flow where ptime='{}'".format(get_time_str_by_ts(t)) - print(sql_q) - return rows = self.mysql_db_vas.query(sql_q) if len(rows) > 0: - return safe_get_int(rows[0], "flow") - - sql = '''update vas_day_flow set flow=%s where ptime=%s''' - - return self.mysql_db_bi.exec(sql, (flow, formatted_dt)) + print(safe_get_int(rows[0], "flow")) + else: + print(0) + # sql = '''update vas_day_flow set flow=%s where ptime=%s''' + # return self.mysql_db_bi.exec(sql, (flow, formatted_dt)) def proc(self): zero_time = get_today_zero_time()