6
0
Fork 0
release
panliang 2022-06-02 17:22:22 +08:00
parent 471346c321
commit d6cbcb1e8a
1 changed files with 2 additions and 2 deletions

View File

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