ソースを参照

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

- 在今日线上订单统计中添加 test_order 字段过滤条件
- 确保只统计非测试订单的数据
- 保持线下订单统计逻辑不变
shichen 4 ヶ月 前
コミット
1ab5669860
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      app/controller/admin/Common.php

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

@@ -170,7 +170,7 @@ class Common extends BaseController
170
         $dayWhere .= " and DATE(create_time) = '" . $todayFormatted . "'";
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
         $todayXiaCount = Db::name('order_merchant')->where($dayWhere)->where('paid', 1)->count();
176
         $todayXiaCount = Db::name('order_merchant')->where($dayWhere)->where('paid', 1)->count();