更新修复退款申请异常

This commit is contained in:
yaooo 2023-08-26 11:39:10 +08:00
parent 1496e33d76
commit eb2c6aeb5c

View File

@ -407,7 +407,7 @@ class StoreRefundOrderRepository extends BaseRepository
$orderId = $order->order_id;
//TODO 订单状态生成佣金
$product = app()->make(StoreOrderProductRepository::class)->userRefundProducts([$productId], $uid, $orderId);
if (!$product)
if ($product->isEmpty())
throw new ValidateException('请选择正确的退款商品');
$product = $product[0];
if ($product['refund_num'] < $num)