From 1d7c694fbd8d21117c4f3a9123d91d673c83eb99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=96=E7=95=8C?= <642747453@qq.com> Date: Wed, 17 Aug 2022 17:17:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#10000=20=E5=BA=93=E5=AD=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Listeners/StockUpdateListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Listeners/StockUpdateListener.php b/app/Listeners/StockUpdateListener.php index a8f26fd..0df8f13 100644 --- a/app/Listeners/StockUpdateListener.php +++ b/app/Listeners/StockUpdateListener.php @@ -36,13 +36,13 @@ class StockUpdateListener foreach ($shops as $shop) { if (isset($event->goodsSku)) { $num = $event->goodsSku->stock; - $businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $event->goodsSku->goods->goods_code . '_' . $event->goodsSku->sku_code)->first(); + $businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $event->goodsSku->goods['goods_code'] . '_' . $event->goodsSku->sku_code)->first(); BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku, $num, false); } if (isset($event->goodsSkus)) { foreach ($event->goodsSkus as $goodsSku) { $num = $goodsSku->stock; - $businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $goodsSku->goods->goods_code . '_' . $goodsSku->sku_code)->first(); + $businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $goodsSku->goods['goods_code'] . '_' . $goodsSku->sku_code)->first(); BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku, $num, false); } }