From b6c5577af706abb0287bb925dca8de002b1713b3 Mon Sep 17 00:00:00 2001 From: weigang Date: Tue, 3 Nov 2020 10:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=AC=BE=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/JsonRpc/OrdersService.php | 6 +++--- app/Service/v3/Implementations/MiniprogramService.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/JsonRpc/OrdersService.php b/app/JsonRpc/OrdersService.php index a5a0322..0473a12 100644 --- a/app/JsonRpc/OrdersService.php +++ b/app/JsonRpc/OrdersService.php @@ -318,15 +318,15 @@ class OrdersService implements OrdersServiceInterface $refundStoreAmount = bcsub($order->money, $couponMoney, 2); $this->financialRecordService->storeRefundDirect($order->store->user_id, $order->id, $refundStoreAmount); - $this->miniprogramService->subscribeMsgForSingleRefund($order->id, $refundStoreAmount); + $this->miniprogramService->subscribeMsgForSingleRefund($order->id, $refundStoreAmount, '', $note); } } elseif ($refundType == 'sub'||$refundType == 'goods') { # 退子订单或者退单品的话,商户只有一个 $orderChildren = Order::query()->with('store:user_id')->where(['id' => $order_child_id])->get(); $this->financialRecordService->storeRefundDirect($orderChild->store->user_id, $orderChild->id, $refundAmount); - $orderGoodsId = $order_goods_id ?? ''; - $this->miniprogramService->subscribeMsgForSingleRefund($order_child_id, $refundAmount, $orderGoodsId); + $orderGoodsId = $order_goods_id ?: ''; + $this->miniprogramService->subscribeMsgForSingleRefund($order_child_id, $refundAmount, $orderGoodsId, $note); } $this->financialRecordService->userRefundDirect($orderMain->user_id, $orderMain->global_order_id, $refundAmount); diff --git a/app/Service/v3/Implementations/MiniprogramService.php b/app/Service/v3/Implementations/MiniprogramService.php index c6d0771..f3b147d 100644 --- a/app/Service/v3/Implementations/MiniprogramService.php +++ b/app/Service/v3/Implementations/MiniprogramService.php @@ -201,7 +201,7 @@ class MiniprogramService implements MiniprogramServiceInterface /** * @inheritDoc */ - public function subscribeMsgForSingleRefund($orderId, $refundStoreAmount, $orderGoodsId = '') + public function subscribeMsgForSingleRefund($orderId, $refundStoreAmount, $orderGoodsId = '', $note = '') { $order = Order::query()->where(['id' => $orderId])->first(); @@ -227,7 +227,7 @@ class MiniprogramService implements MiniprogramServiceInterface 'thing10' => implode(';', $goodsInfo), 'amount3' => $refundStoreAmount, 'date4' => $order->updated_at_text ?? '', - 'thing5' => $order->refund_note ?: '退款', + 'thing5' => $note ?: '退款', ], $page );