1. 打开`\app\common\repositories\store\order\StoreRefundOrderRepository.php` 文件,找到`getRefundTotalPrice`方法
2. 使用下面的代码替换原有的方法
public function getRefundTotalPrice($order, $products)
{
$productRefundPrices = app()->make(StoreRefundProductRepository::class)->userRefundPrice($products->column('order_product_id'));
$product = $products[0];
$productRefundPrice = $productRefundPrices[$product['order_product_id']] ?? [];
$total_refund_price = bcsub($product['product_price'], bcsub($productRefundPrice['refund_price'] ?? 0, $productRefundPrice['refund_postage'] ?? 0, 2), 2);
$postage_price = !$order->status ? bcsub($product['postage_price'], $productRefundPrice['refund_postage'] ?? 0, 2) : 0;
return compact('total_refund_price', 'postage_price');
}
3. 修改后重启 swoole 服务即可
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}