Browse Source

订单统计

gorden 4 months ago
parent
commit
88f91861d0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/admin/controller/order/StatisticsController.php

+ 2 - 2
app/admin/controller/order/StatisticsController.php

@@ -81,9 +81,9 @@ class StatisticsController
         $statistics['todayRefundNbr'] = $todayRefundItem[0]->total;
 
         // 累计退款
-        $totalRefundItem = Db::select("select SUM(d2.pay_amount) as amount,count(1) as total, d1.pay_category as d1_pay_category,d2.pay_category as d2_pay_category from app_pay_detail d1 
+        $totalRefundItem = Db::select("select SUM(d2.pay_amount) as amount,count(1) as total from app_pay_detail d1 
             inner join app_pay_detail d2 ON d1.join_pay_order_id=d2.join_pay_order_id and d2.pay_category='REFUND' 
-            where d1.pay_category in ('" . implode("','", $orderCategory) . "') 
+            where d1.pay_category in ({$orderCategoryStr})
             ");
         $statistics['totalRefund'] = $totalRefundItem[0]->amount;
         $statistics['totalRefundNbr'] = $totalRefundItem[0]->total;