update 直连物流系统数据库查询数据

This commit is contained in:
chenbo 2023-12-04 16:07:25 +08:00
parent 8ef771412c
commit b7491efc4a

View File

@ -95,10 +95,8 @@ class Order extends BaseController
$currOrderList = $currOrderCountQuery->page($page, $limit)->select()->toArray();
foreach ($currOrderList as $k => $order) {
$getUrl = env('LOGISTICS_HOST_URL') . '/api/courierData?order_sn=' . $order['order_sn'];
$response = $client->request('GET', $getUrl);
$courierData = json_decode($response->getBody(), true);
$currOrderList[$k]['courier'] = $courierData['data']['courier_name'];
$courierName = Db::connect('logistics')->name('logistics')->where(['order_sn'=>$order['order_sn']])->value('courier_name');
$currOrderList[$k]['courier'] = $courierName;
$currOrderList[$k]['status'] = $this->getStatusDesc($order['status']);
}