diff --git a/app/Admin/Services/OrderPackageService.php b/app/Admin/Services/OrderPackageService.php index 8fa1b167..b5a18194 100644 --- a/app/Admin/Services/OrderPackageService.php +++ b/app/Admin/Services/OrderPackageService.php @@ -124,7 +124,11 @@ class OrderPackageService $orderProduct->increment('remain_quantity', $changeQuantity[$orderProduct->id]); } - //更新订单状态:如果发货完成,则恢复为发货中 + $package->update([ + 'is_failed'=> true, + ]); + + //更新订单状态:如果订单是发货完成,则恢复为发货中 if ($package->order->isShipped()) { $package->order()->update([ 'shipping_state'=>Order::SHIPPING_STATE_PROCESSING,