浏览代码

admin update

haru haru 3 年之前
父节点
当前提交
66b670ac83
共有 1 个文件被更改,包括 20 次插入1 次删除
  1. 20 1
      admin/control/orderstats.php

+ 20 - 1
admin/control/orderstats.php

@@ -69,7 +69,7 @@ class orderstatsControl extends SystemControl
         } elseif ($end_unixtime > 0) {
             $condition['time_stamp'] = ['lt', $end_unixtime];
         }
-        $stats_list = $model_refill_order->getOrderStatsList($condition,'','*','time_stamp asc');
+        $stats_list = $this->all_orderstats_data($condition);
 
         $total_stats = $this->stats($stats_list);
         $stats = $total_stats[$_GET['order_time_type']];
@@ -105,4 +105,23 @@ class orderstatsControl extends SystemControl
         }
         return $total_stats;
     }
+
+    private function all_orderstats_data($condition): array
+    {
+        $i = 0;
+        $result = [];
+        while (true) {
+            $start = $i * 1000;
+            $list = Model('')->table('refill_stats')->field('*')
+                ->where($condition)->order('time_stamp desc')->limit("{$start},1000")->select();
+            if (empty($list)) {
+                break;
+            }
+            $i++;
+            foreach ($list as $value) {
+                $result[] = $value;
+            }
+        }
+        return $result;
+    }
 }