Parcourir la source

FIX:订单汇总修复

cxyu il y a 3 ans
Parent
commit
659d3dc622
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  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,