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); } // 验证商品库存(店铺库存)