|
|
@@ -132,8 +132,8 @@ class OrderService extends BaseService
|
|
|
$query4 = clone $query;
|
|
|
$counts = [
|
|
|
'total' => $query1->count('id'),
|
|
|
- 'totalAmount' => $query2->where(['status'=>4])->sum('id'),
|
|
|
- 'pending' => $query3->whereIn('status',[1,2])->sum('id'),
|
|
|
+ 'totalAmount' => $query2->where(['status'=>4])->sum('pay_total'),
|
|
|
+ 'pending' => $query3->whereIn('status',[1,2])->count('id'),
|
|
|
'complete' => $query4->where(['status'=>4])->count('id'),
|
|
|
];
|
|
|
|