From 06a645973e575cc76e277bbdec6ab8c5f7c4ea8e Mon Sep 17 00:00:00 2001 From: ykxiao Date: Sat, 9 Sep 2023 15:36:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=B7=E6=B1=82=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/OrderActions/Order.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/OrderActions/Order.php b/src/OrderActions/Order.php index c8a833f..eac6eb3 100644 --- a/src/OrderActions/Order.php +++ b/src/OrderActions/Order.php @@ -124,10 +124,10 @@ class Order $result = 'json' === self::DEFAULT_FORMAT ? json_decode($response, true) : $response; // 日志 - $this->logger(['response' => $result]); + $this->logger(['request' => $body, 'response' => $result]); return $result; } catch (\Exception $e) { - $this->logger(['response' => $e]); + $this->logger(['request' => $body, 'response' => $e]); throw new HttpException($e->getMessage(), $e->getCode(), $e); } } @@ -136,7 +136,7 @@ class Order * 获取工单信息 * @param $order_sn * @return mixed|string - * @throws \Exception|GuzzleException + * @throws GuzzleException */ public function getProductOrder($order_sn) { @@ -150,29 +150,26 @@ class Order * 加工工单原木材种 * @return mixed|string * @throws GuzzleException - * @throws HttpException - * @throws InvalidArgumentException */ public function getWoodTypeOptions($data) { - return $this->baseFun($data, 'Wood.types'); + return $this->sendRequest('Wood.types', $data); } + /** * 加工等级 * @return mixed|string * @throws GuzzleException - * @throws HttpException - * @throws InvalidArgumentException */ public function getProductionLevelOptions($data) { - return $this->baseFun($data, 'production.levels'); + return $this->sendRequest('production.levels', $data); } /** * 加工工单创建 * @return mixed|string - * @throws \Exception|GuzzleException + * @throws GuzzleException */ public function createProductOrder($data) {