feat: #10000 错误修改
This commit is contained in:
parent
068122f3f0
commit
ed5fd2f5f2
@ -36,14 +36,18 @@ 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()->toArray();
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku, $num, false);
|
||||
$businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $event->goodsSku->goods['goods_code'] . '_' . $event->goodsSku->sku_code)->first();
|
||||
if ($businessGoodsSku) {
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku->toArray(), $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()->toArray();
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku, $num, false);
|
||||
$businessGoodsSku = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $goodsSku->goods['goods_code'] . '_' . $goodsSku->sku_code)->first();
|
||||
if ($businessGoodsSku) {
|
||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku->toArray(), $num, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user