From 1777186ba616941fca78038e7d70712599fea878 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Thu, 3 Mar 2022 16:57:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E8=B5=B7=E5=94=AE?= =?UTF-8?q?=E5=90=8E=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/AfterSaleService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/AfterSaleService.php b/app/Services/AfterSaleService.php index d8058d96..ca6319e9 100644 --- a/app/Services/AfterSaleService.php +++ b/app/Services/AfterSaleService.php @@ -38,8 +38,8 @@ class AfterSaleService throw new BizException('赠品不能发起退款/退款退货操作'); } - if ($orderProduct->order->total_amount == 0 && in_array($params['type'], [AfterSale::TYPE_REFUND, Aftersale::TYPE_REFUND_AND_RETURN])) { - throw new BizException('订单支付金额为0的商品不能发起退款/退款退货操作'); + if ($orderProduct->order->is_change && in_array($params['type'], [AfterSale::TYPE_REFUND, Aftersale::TYPE_REFUND_AND_RETURN])) { + throw new BizException('换货后的商品不能发起退款/退款退货操作'); } $amount = ($num == $orderProduct->quantity) ? $orderProduct->total_amount : bcmul(bcdiv($orderProduct->total_amount, $orderProduct->quantity), $num);