粉丝订单总数问题

huazhiyu
lqmac 1 year ago
parent 054a23eb24
commit 7ded155a89
  1. 4
      application/api/controller/User.php

@ -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);
} }

Loading…
Cancel
Save