Commit bd65e4af authored by hangjun83's avatar hangjun83

openapi 1.1

parent af358eda
......@@ -74,7 +74,8 @@ class RhawnOrdersService
throw new \Exception('订单编号不存在',500);
}
$orderDetail = $this->rhawnOrdersService->getCustomerOrderItemsByOrderId($customer['cus_id'],$order['so_id']);
return app(OrderDetailTransformer::class)->transform($orderDetail);
$orderDetail = app(OrderDetailTransformer::class)->transform([$orderDetail]);
return current($orderDetail);
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':getCustomerOrderDetail','error');
......@@ -182,7 +183,8 @@ class RhawnOrdersService
$orderId = $this->rhawnOrdersService->createOrders($data);
if($orderId){
$orderDetail = $this->rhawnOrdersService->getCustomerOrderItemsByOrderId($customer['cus_id'],$orderId);
return app(OrderDetailTransformer::class)->transform($orderDetail);
$orderDetail = app(OrderDetailTransformer::class)->transform([$orderDetail]);
return current($orderDetail);
}
return null;
}catch(\Throwable $exception){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment