|
@@ -160,7 +160,7 @@ def get_channel_overview(channel,pitcher,start,end,page,page_size,order_by,order
|
|
|
|
|
|
def get_channel_again_order_trend(channel,date,pitcher):
|
|
|
if get_channel_belong_pitcher(channel)!=pitcher:
|
|
|
- return "该公众号不属于"+pitcher
|
|
|
+ return []
|
|
|
|
|
|
sql=f"""select toString(dt) date,
|
|
|
channel,book,
|
|
@@ -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):
|
|
|
if get_channel_belong_pitcher(channel)!=pitcher:
|
|
|
- return f"{channel} dont belong to {pitcher} or the channel stop cost",1
|
|
|
+ return [],0
|
|
|
|
|
|
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,
|
|
@@ -376,38 +376,13 @@ select toDate(formatDateTime(reg_time,'%Y-%m-%d')) dt,
|
|
|
li.append(di)
|
|
|
return li,total
|
|
|
|
|
|
-def get_channel_order_trend(channel,start,end):
|
|
|
- a=[{
|
|
|
- 'date': '2020-12-01',
|
|
|
- 'channel': '宝珠书屋',
|
|
|
- 'book': '魏汝稳',
|
|
|
- 'cost': 234.11,
|
|
|
- 'reg_amount': 123.11,
|
|
|
- 'roi': 0.45,
|
|
|
- 'new_follow_user': 11,
|
|
|
- 'new_follow_per_cost': 234.11,
|
|
|
- 'order_user': 222,
|
|
|
- 'order_count': 12312,
|
|
|
- 'order_user_per_cost': 123.11,
|
|
|
- 'd1':{
|
|
|
- 'order':232.11,
|
|
|
- 'roi':0.2341,
|
|
|
- 'add':0.4511,
|
|
|
- 'mult':1.12},
|
|
|
- 'd2': {
|
|
|
- 'order': 232.11,
|
|
|
- 'roi': 0.2341,
|
|
|
- 'add': 0.4511,
|
|
|
- 'mult': 1.12},
|
|
|
- 'd3': {
|
|
|
- 'order': 232.11,
|
|
|
- 'roi': 0.2341,
|
|
|
- 'add': 0.4511,
|
|
|
- 'mult': 1.12},
|
|
|
- }]
|
|
|
+def get_channel_order_trend(channel,pitcher,start,end,page,page_size,order_by,order):
|
|
|
+ if get_channel_belong_pitcher(channel)!=pitcher:
|
|
|
+ return [],0
|
|
|
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]
|
|
|
+ a=''
|
|
|
return a,total
|
|
|
|
|
|
def get_channel_summary(channel,pitcher,page,page_size,order_by,order):
|