This commit is contained in:
lwl0608 2024-05-08 16:54:43 +08:00
parent af9a09ca48
commit 95a8f78893
1 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class S:
return 0
def get_flow(self, st, et):
sql = '''select sum(pay_amount) flow from vas_order where ct>={} and ct<{}'''.format(st, et)
sql = '''select sum(pay_amount) flow from vas_order where ct>={} and ct<{} and order_status in (1,2);'''.format(st, et)
rows = self.mysql_db_vas.query(sql)
if len(rows) > 0:
return safe_get_int(rows[0], "flow")
@ -37,6 +37,8 @@ class S:
zero_time = get_today_zero_time() - 86400
last_time = self.get_last_ptime()
last_time = get_today_zero_time() - 86400
while last_time <= get_today_zero_time():
next_time = last_time + 300
flow = self.get_flow(zero_time, next_time)