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