From 31b4169b4598f15c8e8000fccf71cc537f10c5f4 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Fri, 27 Oct 2023 21:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);