|
|
|
@ -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); |
|
|
|
|