ck 4 роки тому
батько
коміт
248d356f62
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      data_manage/pitcher_panel.py

+ 2 - 2
data_manage/pitcher_panel.py

@@ -16,7 +16,7 @@ def get_channel_belong_pitcher(channel):
     for i in data:
     for i in data:
         di[i[1]]=i[0]
         di[i[1]]=i[0]
 
 
-    return di[channel]
+    return di.get(channel,'')
 
 
 
 
 
 
@@ -262,7 +262,7 @@ def get_channel_again_order_trend(channel,date,pitcher):
 
 
 def get_channel_active(channel,pitcher,start,end,page,page_size,order_by,order):
 def get_channel_active(channel,pitcher,start,end,page,page_size,order_by,order):
     if get_channel_belong_pitcher(channel)!=pitcher:
     if get_channel_belong_pitcher(channel)!=pitcher:
-        return f"公众号:{channel} 不属于 {pitcher}"
+        return f"{channel} dont belong to {pitcher}  or the channel stop cost",1
 
 
     sql=f"""select formatDateTime(a.dt,'%Y-%m-%d') date, '{channel}' channel,book,cost,reg_amount,roi,new_follow_user,new_follow_per_cost,order_user,order_count,
     sql=f"""select formatDateTime(a.dt,'%Y-%m-%d') date, '{channel}' channel,book,cost,reg_amount,roi,new_follow_user,new_follow_per_cost,order_user,order_count,
        order_user_per_cost,day7_avg_act_rate,day7_avg_act_per_cost,day30_avg_act_rate,ay30_avg_act_cost,
        order_user_per_cost,day7_avg_act_rate,day7_avg_act_per_cost,day30_avg_act_rate,ay30_avg_act_cost,