rabin 9 月之前
父节点
当前提交
83fdf84334
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/dai/seller/api/Task.php

+ 8 - 2
src/dai/seller/api/Task.php

@@ -85,8 +85,14 @@ class Task
     # 统计
     public function stat()
     {
-        # 获取昨天的时间
-        $time = \Dever\Helper\Date::day(1);
+        $day = Dever::input('day');
+        if ($day) {
+            $time = \Dever\Helper\Date::day($day);
+        } else {
+            # 获取昨天的时间
+            $time = \Dever\Helper\Date::day(1);
+        }
+        
         $where['cdate'] = array('>=', $time[0]);
         $where['#cdate'] = array('<=', $time[1]);
         $order = Dever::db('order_bak', 'seller')->load($where);