|
@@ -108,7 +108,7 @@ where 1=1 {op1}
|
|
|
return db.dm.getData_json(sql)
|
|
|
|
|
|
|
|
|
-def get_channel_overview(user_id, channel, pitcher, stage, book, start, end, page, page_size, order_by, order):
|
|
|
+def get_channel_overview(user_id, channel, pitcher, stage, book,agentId, start, end, page, page_size, order_by, order):
|
|
|
db = MysqlUtils()
|
|
|
if user_id in super_auth():
|
|
|
op = ''
|
|
@@ -127,6 +127,7 @@ def get_channel_overview(user_id, channel, pitcher, stage, book, start, end, pag
|
|
|
op5 = f" order by {order_by} {order}" if order_by and order else ''
|
|
|
op6 = f" and stage='{stage}'" if stage else ''
|
|
|
op7 = f" and book='{book}'" if book else ''
|
|
|
+ op8 = f" and agent_id = '{agentId}'" if agentId else ''
|
|
|
|
|
|
sql = f"""select channel,dt date,reg_num,
|
|
|
round(if(reg_num=0,0,cost/reg_num),2) reg_per_cost,
|
|
@@ -169,7 +170,7 @@ def get_channel_overview(user_id, channel, pitcher, stage, book, start, end, pag
|
|
|
round(reg_order_amount/reg_order_user,2) user_per_amount,
|
|
|
round(follow_user/click_count,4) click_follow_rate,
|
|
|
round(reg_order_user/follow_user,4) follow_order_rate
|
|
|
-from dw_channel where 1=1 {op} {op1} {op2} {op3} {op4} {op6} {op7} {op5} """
|
|
|
+from dw_channel where 1=1 {op} {op1} {op2} {op3} {op4} {op6} {op7} {op8} {op5} """
|
|
|
|
|
|
sumsql = f"""select '总计' date,
|
|
|
sum(reg_num) reg_num,
|