|
|
@@ -120,6 +120,16 @@ class TradeService extends BaseService
|
|
|
->orderBy('a.create_time', 'desc')
|
|
|
->orderBy('a.id', 'desc');
|
|
|
|
|
|
+ $totalModdel = $model;
|
|
|
+ $counts = ['total' => 0, 'service_fee' => 0, 'bonus' => 0, 'fee' => 0];
|
|
|
+ $total = $totalModdel->sum('a.real_price');
|
|
|
+ $counts['total'] = intval($total);
|
|
|
+ $bonus = $totalModdel->sum('a.bonus');
|
|
|
+ $counts['bonus'] = intval($bonus);
|
|
|
+ $serviceFee = $totalModdel->sum('a.service_fee');
|
|
|
+ $counts['service_fee'] = intval($serviceFee);
|
|
|
+ $fee = $totalModdel->sum('a.fee');
|
|
|
+ $counts['fee'] = intval($fee);
|
|
|
|
|
|
$list = $model->paginate($pageSize > 0 ? $pageSize : 9999999);
|
|
|
$list = $list ? $list->toArray() : [];
|
|
|
@@ -136,15 +146,7 @@ class TradeService extends BaseService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $counts = ['total' => 0, 'service_fee' => 0, 'bonus' => 0, 'fee' => 0];
|
|
|
- $total = $model->sum('a.real_price');
|
|
|
- $counts['total'] = intval($total);
|
|
|
- $bonus = $model->sum('a.bonus');
|
|
|
- $counts['bonus'] = intval($bonus);
|
|
|
- $serviceFee = $model->sum('a.service_fee');
|
|
|
- $counts['service_fee'] = intval($serviceFee);
|
|
|
- $fee = $model->sum('a.fee');
|
|
|
- $counts['fee'] = intval($fee);
|
|
|
+
|
|
|
|
|
|
return [
|
|
|
'pageSize' => $pageSize,
|