ck 4 年之前
父节点
当前提交
40fcad3eb6
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      data_manage/pitcher_panel.py

+ 8 - 8
data_manage/pitcher_panel.py

@@ -91,12 +91,13 @@ if(total_cost=0,0,total_amount/total_cost) total_roi from
 
 
 
 
 def get_pitcher_panel_overview(pitcher):
 def get_pitcher_panel_overview(pitcher):
-    ck = CkUtils()
+    db=MysqlUtils()
     sql=f"""select  pitcher,
     sql=f"""select  pitcher,
-        cost cost,
-        amount amount,
-        roi roi, 
-       channel_count,on_channel_count,
+        total_cost,
+        total_amount,
+        roi , 
+       channel_count,
+     on_channel_count,
     off_channel_count,
     off_channel_count,
     this_month_cost this_month_cost,
     this_month_cost this_month_cost,
   this_month_amount this_month_amount,
   this_month_amount this_month_amount,
@@ -107,15 +108,14 @@ def get_pitcher_panel_overview(pitcher):
     last_month_far_amount last_month_far_amount,
     last_month_far_amount last_month_far_amount,
        follow_user,
        follow_user,
     last_month_far_roi last_month_far_roi
     last_month_far_roi last_month_far_roi
-       from  dm_pitcher_daily_page_total where  dt='{du.get_n_days(0)}'"""
+       from  dm_pitcher_daily_overview where  dt='{du.get_n_days(0)}'"""
 
 
     if pitcher != 'all':
     if pitcher != 'all':
         sql += f" and pitcher='{pitcher}' "
         sql += f" and pitcher='{pitcher}' "
 
 
     print(sql)
     print(sql)
-    data=ck.execute(sql)
+    data=db.quchen_text.getData(sql)
     print(data)
     print(data)
-
     key=['pitcher','cost','amount','roi','channel_count','on_channel_count','off_channel_count','this_month_cost','this_month_amount','this_month_roi',
     key=['pitcher','cost','amount','roi','channel_count','on_channel_count','off_channel_count','this_month_cost','this_month_amount','this_month_roi',
          'last_month_cost','last_month_amount','last_month_roi','last_month_far_amount','follow_user','last_month_far_roi']
          'last_month_cost','last_month_amount','last_month_roi','last_month_far_amount','follow_user','last_month_far_roi']
     return get_dict_list(key,get_round(data))
     return get_dict_list(key,get_round(data))