|
@@ -494,7 +494,7 @@ left join dw_channel_user_daily b using(dt,channel) {op5}
|
|
|
return data, total
|
|
|
|
|
|
|
|
|
-def get_channel_order_trend(user_id, channel, game,pitcher,agent_id, start, end, page, page_size, order_by, order):
|
|
|
+def get_channel_order_trend(user_id, channel, game,agent_type,pitcher,agent_id, start, end, page, page_size, order_by, order):
|
|
|
db = MysqlUtils()
|
|
|
if user_id in super_auth():
|
|
|
op = ''
|
|
@@ -521,7 +521,7 @@ def get_channel_order_trend(user_id, channel, game,pitcher,agent_id, start, end,
|
|
|
op5 = f" order by {order_by} {order}" if order_by and order else ''
|
|
|
op6 = f" and agent_id = '{agent_id}' " if agent_id else ''
|
|
|
op7 = f" and book = '{game}' " if game else ''
|
|
|
- # op8 = f" and type = '{type}' " if type else ''
|
|
|
+ op8 = f" and type = '{agent_type}' " if agent_type else ''
|
|
|
|
|
|
base_sql_multi_channel = f'''
|
|
|
(select a.dt,a.agent_name agent_name,a.create_user_num,sum(a.reg_num) reg_num ,group_concat(a.channel) channel ,group_concat(a.pitcher ) pitcher ,
|
|
@@ -613,7 +613,7 @@ def get_channel_order_trend(user_id, channel, game,pitcher,agent_id, start, end,
|
|
|
group_concat(annual_mult) as annual_mult
|
|
|
from
|
|
|
( select * from dw_channel where cost+reg_order_amount>0
|
|
|
- {op} {op1} {op2} {op3} {op4} {op6} {op7} ) a
|
|
|
+ {op} {op1} {op2} {op3} {op4} {op6} {op7} {op8}) a
|
|
|
left join dw_channel_amount_daily b on a.channel=b.channel
|
|
|
and a.dt=b.dt
|
|
|
left join src_book_info c on a.dt=c.dt and a.book=c.book
|
|
@@ -622,7 +622,7 @@ def get_channel_order_trend(user_id, channel, game,pitcher,agent_id, start, end,
|
|
|
'''
|
|
|
|
|
|
base_sql_singel_channel = f'''
|
|
|
- ( select * from dw_channel where cost+reg_order_amount>0 {op} {op1} {op2} {op3} {op4} {op6} {op7} ) a
|
|
|
+ ( select * from dw_channel where cost+reg_order_amount>0 {op} {op1} {op2} {op3} {op4} {op6} {op7} {op8}) a
|
|
|
left join dw_channel_amount_daily b on a.channel=b.channel and a.dt=b.dt
|
|
|
left join src_book_info c on a.dt=c.dt and a.book=c.book and a.type=c.type and a.platform=c.platform
|
|
|
'''
|