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

order

@@ -10,6 +10,8 @@ namespace app\portal\controller; @@ -10,6 +10,8 @@ namespace app\portal\controller;
10 10
11 11
12 use cmf\controller\AdminBaseController; 12 use cmf\controller\AdminBaseController;
  13 +use think\Db;
  14 +
13 /** 15 /**
14 * Class AdminStatisticsController 16 * Class AdminStatisticsController
15 * @package app\portal\controller 17 * @package app\portal\controller
@@ -42,7 +44,10 @@ class AdminStatisticsController extends AdminBaseController{ @@ -42,7 +44,10 @@ class AdminStatisticsController extends AdminBaseController{
42 dump($month); 44 dump($month);
43 45
44 46
45 - dump(date('hh',1543199301)); 47 + $where['create_time']=['between',[strtotime(date('Y-m-d 7:i:s')),strtotime(date('Y-m-d 12:i:s'))]];
  48 + $num=Db::name('order')->where($where)->count();
  49 +
  50 + dump($num);
46 51
47 return $this->fetch(); 52 return $this->fetch();
48 } 53 }