ck 4 anni fa
parent
commit
c9b2870f74
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      data_manage/pitcher_panel.py

+ 4 - 3
data_manage/pitcher_panel.py

@@ -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,