From 4d498f99a35c22b712bd1b67ebea11236866dcaa Mon Sep 17 00:00:00 2001 From: zty Date: Tue, 6 Aug 2024 16:11:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20enm/task=20=E6=B0=B4=E6=B3=A5=E6=89=B9?= =?UTF-8?q?=E5=8F=B7=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/enm/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/enm/tasks.py b/apps/enm/tasks.py index b7054764..a60b4710 100644 --- a/apps/enm/tasks.py +++ b/apps/enm/tasks.py @@ -90,13 +90,13 @@ def db_ins_mplogx(): WHERE bill_date > %s ORDER BY id, bill_date """ + # date_obj = datetime.datetime.strptime(bill_date, '%Y-%m-%d %H:%M:%S') cursor.execute(query, (bill_date,)) rows = cursor.fetchall() # 获取数据后保存至本地 if rows: - bill_date = rows[-1][0] - print(rows) + bill_date = rows[-1][-1] db_insert_mplogx_batch(rows) - update_sysconfig({'enm1': {'bill_date': bill_date}}) + update_sysconfig({'enm1': {'bill_date': str(bill_date)}})