作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

order

@@ -35,10 +35,13 @@ class AdminStatisticsController extends AdminBaseController{ @@ -35,10 +35,13 @@ class AdminStatisticsController extends AdminBaseController{
35 } 35 }
36 $where=array(); 36 $where=array();
37 for ($i = 0; $i<15; $i++){ 37 for ($i = 0; $i<15; $i++){
38 - $where[$i]=['between',[$week[$i],$week[$i+1]]]; 38 + $where[$i]=[$week[$i],$week[$i+1]];
39 } 39 }
40 -  
41 - dump($where); 40 + $Week_statistics=array();
  41 + for ($i = 0; $i<15; $i++){
  42 + $Week_statistics[]=Db::name('order')->where('start_time','between',$where[$i])->count();
  43 + }
  44 + dump($Week_statistics);
42 45
43 $month=array(); 46 $month=array();
44 for ($i = 0; $i <= 24; $i++){ 47 for ($i = 0; $i <= 24; $i++){