This commit is contained in:
lwl0608 2024-06-17 19:03:54 +08:00
parent 1a5af43d26
commit 17fedaeeaa
1 changed files with 5 additions and 0 deletions

View File

@ -43,10 +43,15 @@ class S:
et = st + 86400
sql = "SELECT mid, SUM(`change`) AS income FROM `vas_ch_income` WHERE mid>0 AND ct>={} AND ct<{} GROUP BY mid".format(st, et)
rows = self.mysql_db_vas.query(sql)
print("len(rows): {}".format(len(rows)))
dt = datetime.datetime.fromtimestamp(st)
formatted_dt = dt.strftime('%Y-%m-%d 00:00:00')
idx = 0
for row in rows:
idx += 1
print("{}/{}, {}".format(idx, len(row), dict2json(row)))
mid = safe_get_int(row, "mid")
income = safe_get_int(row, "income")