From 15f0927d416ec31e9b1ab0508f106b054b5c385b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 16 Nov 2023 16:09:22 +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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 4052098c..92f0be31 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2359,7 +2359,8 @@ class ProductRepository extends BaseRepository } } if ($orderProduct->is_imported == 0) { - $attrValue->update(['stock' => $attrValue->stock + $stockIn]); + + $attrValue->stock=$attrValue->stock + $stockIn; $product->stock = $stockIn + $product->stock; $data = [ 'order_id' => $params['order_id'] ?? 0,