ck 4 年之前
父節點
當前提交
0238191f31
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      data_manage/pitcher_panel.py

+ 5 - 2
data_manage/pitcher_panel.py

@@ -157,11 +157,14 @@ def get_channel_overview(channel,pitcher,start,end,page,page_size,order_by,order
         sql+=f" and dt<='{end}'"
         sql+=f" and dt<='{end}'"
     if pitcher!='':
     if pitcher!='':
         if pitcher!='赞象 admin':
         if pitcher!='赞象 admin':
-            sql+=f" and channel in {get_channels_from_user(pitcher)}"
+            if get_channels_from_user(pitcher).__len__()==0:
+                sql+=f"  and pitcher='{pitcher}'"
+            else:
+                sql+=f" and channel in {get_channels_from_user(pitcher)}"
     print(sql)
     print(sql)
     total = ck.execute(f"select count(1) from ({sql}) a")[0][0]
     total = ck.execute(f"select count(1) from ({sql}) a")[0][0]
     sql += f" order by {order_by} {order} limit {(page-1)*page_size},{page_size} "
     sql += f" order by {order_by} {order} limit {(page-1)*page_size},{page_size} "
-    
+
 
 
     key=['channel','date','view_count','click_count','click_rate','follow_user','follow_rate','follow_per_cost','order_rate','order_per_cost','cost',
     key=['channel','date','view_count','click_count','click_rate','follow_user','follow_rate','follow_per_cost','order_rate','order_per_cost','cost',
          'first_order_count','first_order_user','first_order_amount','order_count','order_user','order_amount','old_order_amount','first_amount_per_user','amount_per_follow','first_cost_per_user',
          'first_order_count','first_order_user','first_order_amount','order_count','order_user','order_amount','old_order_amount','first_amount_per_user','amount_per_follow','first_cost_per_user',