ck 4 سال پیش
والد
کامیت
4a318c5982
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      data_manage/pitcher_panel.py

+ 4 - 4
data_manage/pitcher_panel.py

@@ -33,12 +33,12 @@ def get_pitcher_panel_channel(pitcher,channel,start,end,page,page_size,order_by,
            dt as date,cost,first_order_amount,
            if(cost=0,0,first_order_amount/cost) first_roi,
            first_order_user,first_order_count,
-           if(first_order_user=0,0,cost/first_order_user) first_per_cost,
+           round(if(first_order_user=0,0,cost/first_order_user),2) first_per_cost,
            view_count,click_count,follow_user,
-           if(click_count=0,0,follow_user/click_count) follow_rate,
-           if(follow_user=0,0,cost/follow_user) follow_per_cost,
+           round(if(click_count=0,0,follow_user/click_count),4) follow_rate,
+           round(if(follow_user=0,0,cost/follow_user),2) follow_per_cost,
            total_cost,
-           if(total_cost=0,0,total_amount/total_cost) back_rate
+           round(if(total_cost=0,0,total_amount/total_cost),4) back_rate
            from dw_channel_daily where dt>='{start}' and dt<='{end}' {op1} {op2} 
            order by {order_by} {order}
 """