再次更新

This commit is contained in:
shengchanzhe 2023-10-27 20:31:21 +08:00
parent 79109e7f04
commit bcd574a3e2

View File

@ -2370,6 +2370,7 @@ class ProductRepository extends BaseRepository
if ($stockIn <= 0) {
throw new ValidateException('入库数量不能小于等于0');
}
//111
ProductAttrValue::where('mer_id', $merId)->where('product_id', $product['product_id'])->where('sku', $sku)->update(['stock'=>$attrValue->stock + $stockIn]);
$product->stock = $stockIn + $product->stock;