Explorar o código

添加投手关联渠道

cola %!s(int64=2) %!d(string=hai) anos
pai
achega
19d313edc1
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      data_manage/pitcher_panel.py

+ 4 - 3
data_manage/pitcher_panel.py

@@ -107,10 +107,11 @@ where 1=1 {op1}
     print(sql)
     return db.dm.getData_json(sql)
 
-def get_agent_list():
+def get_agent_list(pitcher):
     db = MysqlUtils()
-    sql="""
-    select distinct agent_id, agent_name from dw_channel where agent_id is not null and agent_id!= ''
+    op = f" and pitcher ='{pitcher}' " if pitcher else ''
+    sql=f"""
+    select distinct agent_id, agent_name from dw_channel where agent_id is not null and agent_id!= '' {op}
     """
     return db.dm.getData_json(sql)