From d6cbcb1e8a9bae8f25877379c13dbf0cb22371ca Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Thu, 2 Jun 2022 17:22:22 +0800 Subject: [PATCH] w --- .../Api/Http/Controllers/Order/OrderPreController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Endpoint/Api/Http/Controllers/Order/OrderPreController.php b/app/Endpoint/Api/Http/Controllers/Order/OrderPreController.php index b7d699c2..b6e7c39b 100644 --- a/app/Endpoint/Api/Http/Controllers/Order/OrderPreController.php +++ b/app/Endpoint/Api/Http/Controllers/Order/OrderPreController.php @@ -43,12 +43,12 @@ class OrderPreController extends Controller // 验证商品是否属于该店铺 $store_product = $store->productSkus()->wherePivot('product_sku_id', $sku_id)->first(); if (!$store_product) { - throw new BizException('店铺未出售商品: ' . $store_product->name); + throw new BizException('店铺未出售商品: ' . $sku_id); } // 验证商品是否可销售 if (!$store_product->pivot->status) { - throw new BizException('店铺已下架商品: ' . $store_product->name); + throw new BizException('店铺已下架商品: ' . $sku_id); } // 验证商品库存(店铺库存)