ck 4 years ago
parent
commit
b1620265e5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      data_manage/pitcher_panel.py

+ 2 - 1
data_manage/pitcher_panel.py

@@ -418,9 +418,10 @@ select toDate(formatDateTime(reg_time,'%Y-%m-%d')) dt,
        count(distinct if(addDays(toDate(formatDateTime(reg_time,'%Y-%m-%d')),27)>=date,user_id,NULL)) reg_order_user28,
        count(distinct if(addDays(toDate(formatDateTime(reg_time,'%Y-%m-%d')),28)>=date,user_id,NULL)) reg_order_user29,
        count(distinct if(addDays(toDate(formatDateTime(reg_time,'%Y-%m-%d')),29)>=date,user_id,NULL)) reg_order_user30
-       from order where  {channel} {channels} and dt>='{start}' group by formatDateTime(reg_time,'%Y-%m-%d')) b on a.dt=b.dt 
+       from order where  1=1 {channel} {channels} and dt>='{start}' group by formatDateTime(reg_time,'%Y-%m-%d')) b on a.dt=b.dt 
 """
 
+
     total = ck.execute(f"select count(1) from ({sql}) a")[0][0]
     sql+=f" order by {order_by} {order} limit {(page-1)*page_size},{page_size} "
     data = ck.execute(sql)