update: statistics service

This commit is contained in:
v2board 2023-05-03 15:44:32 +08:00
parent ae0fd63929
commit c6fbb89452

View File

@ -74,7 +74,7 @@ class StatisticalService {
$commissionLogBuilder = CommissionLog::where('created_at', '>=', $startAt)
->where('created_at', '<', $endAt);
$data['commission_count'] = $commissionLogBuilder->count();
$data['commission_amount'] = $commissionLogBuilder->sum('get_amount');
$data['commission_total'] = $commissionLogBuilder->sum('get_amount');
$data['register_count'] = User::where('created_at', '>=', $startAt)
->where('created_at', '<', $endAt)
->count();