|
@@ -91,12 +91,13 @@ if(total_cost=0,0,total_amount/total_cost) total_roi from
|
|
|
|
|
|
|
|
|
def get_pitcher_panel_overview(pitcher):
|
|
|
- ck = CkUtils()
|
|
|
+ db=MysqlUtils()
|
|
|
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,
|
|
|
this_month_cost this_month_cost,
|
|
|
this_month_amount this_month_amount,
|
|
@@ -107,15 +108,14 @@ def get_pitcher_panel_overview(pitcher):
|
|
|
last_month_far_amount last_month_far_amount,
|
|
|
follow_user,
|
|
|
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':
|
|
|
sql += f" and pitcher='{pitcher}' "
|
|
|
|
|
|
print(sql)
|
|
|
- data=ck.execute(sql)
|
|
|
+ data=db.quchen_text.getData(sql)
|
|
|
print(data)
|
|
|
-
|
|
|
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']
|
|
|
return get_dict_list(key,get_round(data))
|