diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 7d7a6145..f61fda95 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2352,7 +2352,7 @@ class ProductRepository extends BaseRepository $stockIn=1; } 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]); $data = [ 'order_id' => $params['order_id'] ?? 0, @@ -2363,7 +2363,7 @@ class ProductRepository extends BaseRepository 'unique' => $attrValue['unique'], 'price' => $price, 'mer_id' => $product->mer_id, - 'supplier_mer_id' => $supplierMerId, + 'supplier_mer_id' => $orderMerId??0, ]; if (!$model->save($data)) { throw new \Exception('入库失败', 500);