store
parent
47afe5b6a8
commit
856515cff9
|
|
@ -68,8 +68,8 @@ class StoreController extends Controller
|
|||
$spu = $store->productSpus()->with(['specs', 'features'])->findOrFail($id);
|
||||
|
||||
$sku = $store->productSkus()
|
||||
->wherePivot('product_spu_id', $spu->id)
|
||||
->when($request->filled('sku_id'), fn($q) => $q->wherePivot('product_sku_id', $request->input('sku_id')))
|
||||
->where('product_spu_id', $spu->id)
|
||||
->when($request->filled('sku_id'), fn($q) => $q->where('product_sku_id', $request->input('sku_id')))
|
||||
->first();
|
||||
if (!$sku) {
|
||||
throw new BizException('商品sku未上架');
|
||||
|
|
|
|||
Loading…
Reference in New Issue