Przeglądaj źródła

fix(admin): 排除测试订单统计

- 在今日线上订单统计中添加 test_order 字段过滤条件
- 确保只统计非测试订单的数据
- 保持线下订单统计逻辑不变
shichen 4 miesięcy temu
rodzic
commit
1ab5669860
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/controller/admin/Common.php

+ 1 - 1
app/controller/admin/Common.php

@@ -170,7 +170,7 @@ class Common extends BaseController
170 170
         $dayWhere .= " and DATE(create_time) = '" . $todayFormatted . "'";
171 171
 
172 172
         //线上订单
173
-        $todayShangCount = Db::name('store_order')->where($dayWhere)->where('paid', 1)->count();
173
+        $todayShangCount = Db::name('store_order')->where($dayWhere)->where('paid', 1)->where('test_order', 0)->count();
174 174
 
175 175
         //线下订单
176 176
         $todayXiaCount = Db::name('order_merchant')->where($dayWhere)->where('paid', 1)->count();