Explorar o código

FIX:订单汇总修复

cxyu %!s(int64=3) %!d(string=hai) anos
pai
achega
659d3dc622
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      handlers/OrderHandler.py

+ 4 - 1
handlers/OrderHandler.py

@@ -93,7 +93,10 @@ class OrderInfoNobody(BaseHandler):
             if not is_over:
 
                 op1 = f''' and dt >= '{start}' and dt <= '{end}'  '''
-                op2 = f''' and name = '{game}' '''
+                op2 = ''
+                if game:
+                    game_str = "'" + "','".join(game) + "'"
+                    op2 = f" and name in ({game_str}) "
 
                 sql = f'''
                        select DATE_FORMAT(dt,"%Y-%m-%d") dt,name game,