|
@@ -715,9 +715,10 @@ def get_channel_summary(channel,pitcher,page,page_size,order_by,order,state):
|
|
|
channel_op=f" and channel='{channel}'" if channel!='' else ''
|
|
|
|
|
|
|
|
|
- sql = f"""select a.channel channel,state,'朋友圈' location,toString(start) start,toString(end) end,total_cost,total_amount,
|
|
|
- profit,roi,follow_user,follow_per_cost,order_user,
|
|
|
- if(follow_user=0,0,order_user/follow_user) order_tran_rate,if(order_user=0,0,total_cost/order_user) order_tran_cost
|
|
|
+ sql = f"""select a.channel channel,state,'朋友圈' location,toString(start) start,toString(end) end,
|
|
|
+ toDecimal32(total_cost,2),toDecimal32(total_amount,2),
|
|
|
+ toDecimal32(profit,2),roi,follow_user,toDecimal32(follow_per_cost,2),order_user,
|
|
|
+ if(follow_user=0,0,order_user/follow_user) order_tran_rate,toDecimal32(if(order_user=0,0,total_cost/order_user),2) order_tran_cost
|
|
|
from
|
|
|
(
|
|
|
select channel,if(max(dt)>subtractDays(today(),10),'在投','停投') state,
|