|
@@ -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;
|