|
|
|
@ -557,8 +557,8 @@ class User extends Api |
|
|
|
|
$user_ids = array_column($users, "id"); |
|
|
|
|
|
|
|
|
|
$data = [ |
|
|
|
|
'total_fans_order_amount' => order::whereIn('buyer_id', $user_ids)->whereIn('status', [0,1,2,3,4,5,6,7])->sum('order_amount'), |
|
|
|
|
'today_fans_order_num' => order::whereIn('buyer_id', $user_ids)->whereIn('status', [0,1,2,3,4,5,6,7])->count(), |
|
|
|
|
'total_fans_order_amount' => $user_ids ? order::whereIn('buyer_id', $user_ids)->whereIn('status', [0,1,2,3,4,5,6,7])->sum('order_amount') : "0.00", |
|
|
|
|
'today_fans_order_num' => $user_ids ? order::whereIn('buyer_id', $user_ids)->whereIn('status', [0,1,2,3,4,5,6,7])->count() : 0, |
|
|
|
|
]; |
|
|
|
|
$this->success("succ", $data); |
|
|
|
|
} |
|
|
|
|