dataview 订单排行

This commit is contained in:
chenbo 2023-12-02 11:56:48 +08:00
parent 56771e3155
commit 2542a96919

View File

@ -146,8 +146,9 @@ class Order extends BaseController
// $orderCountQuery->whereDay('create_time', 'today');
// }
// $orderRankingList = $orderRankingQuery->group('op.street_code')->order('order_count desc')->select();
$cmf_arr = array_column($townList, 'order_count');
array_multisort($cmf_arr, SORT_DESC, $townList);
$orderCountArr = array_column($townList, 'order_count');
array_multisort($orderCountArr, SORT_DESC, $townList);
return app('json')->success($townList);
}
}