更新
This commit is contained in:
parent
79d4d3adb9
commit
31b4169b45
@ -2352,7 +2352,7 @@ class ProductRepository extends BaseRepository
|
|||||||
$stockIn=1;
|
$stockIn=1;
|
||||||
}
|
}
|
||||||
ProductAttrValue::where('mer_id', $merId)
|
ProductAttrValue::where('mer_id', $merId)
|
||||||
->where('product_id', $params['product_id'])->where('unique', $params['unique'])
|
->where('product_id', $params['product_id'])
|
||||||
->update(['stock'=>$attrValue->stock + $stockIn]);
|
->update(['stock'=>$attrValue->stock + $stockIn]);
|
||||||
$data = [
|
$data = [
|
||||||
'order_id' => $params['order_id'] ?? 0,
|
'order_id' => $params['order_id'] ?? 0,
|
||||||
@ -2363,7 +2363,7 @@ class ProductRepository extends BaseRepository
|
|||||||
'unique' => $attrValue['unique'],
|
'unique' => $attrValue['unique'],
|
||||||
'price' => $price,
|
'price' => $price,
|
||||||
'mer_id' => $product->mer_id,
|
'mer_id' => $product->mer_id,
|
||||||
'supplier_mer_id' => $supplierMerId,
|
'supplier_mer_id' => $orderMerId??0,
|
||||||
];
|
];
|
||||||
if (!$model->save($data)) {
|
if (!$model->save($data)) {
|
||||||
throw new \Exception('入库失败', 500);
|
throw new \Exception('入库失败', 500);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user