Ver Fonte

MOD:订单自然量修改

cxyu há 3 anos atrás
pai
commit
9293f5296e
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      handlers/OrderHandler.py

+ 2 - 2
handlers/OrderHandler.py

@@ -383,9 +383,9 @@ class OrderH5Info(BaseHandler):
             sum(a.amount) sum_amount, 
             sum(if(a.app_id=c.app_id,a.amount,0)) natural_amount,
             count(DISTINCT(a.mem_id)) as human_count,
-            count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,0))) natural_human_count,
+            count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,null))) natural_human_count,
             ROUND(if(sum(a.amount)>0,sum(if(a.app_id=c.app_id,a.amount,0)) /sum(a.amount),0) ,2) amount_rate,
-            ROUND( if(count(DISTINCT(a.mem_id))>0,count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,0)))/count(DISTINCT(a.mem_id)),0),2) human_count_rate
+            ROUND( if(count(DISTINCT(a.mem_id))>0,count(DISTINCT(if(a.app_id=c.app_id,a.mem_id,null)))/count(DISTINCT(a.mem_id)),0),2) human_count_rate
             from db_mp.h_pay a
             left join db_mp.h_member c on a.mem_id = c.id 
             where a.app_id in (select id from db_mp.h_game