mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 06:30:49 +00:00
fix: #10000 库存同步全量更新
This commit is contained in:
parent
d17d96b9cd
commit
f6eda150b6
@ -55,14 +55,12 @@ class UpdateBusinessGoodsStock implements ShouldQueue
|
|||||||
|
|
||||||
foreach ($shops as $shop) {
|
foreach ($shops as $shop) {
|
||||||
$num = $event->num;
|
$num = $event->num;
|
||||||
$isIncremental = true;
|
|
||||||
if ('妙选' === $shop->plat_id) {
|
if ('妙选' === $shop->plat_id) {
|
||||||
$num = $event->goodsSku->stock;
|
$num = $event->goodsSku->stock;
|
||||||
$isIncremental = false;
|
|
||||||
}
|
}
|
||||||
$businessGoodsSkus = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $event->businessOrderItem['external_sku_id'])->get();
|
$businessGoodsSkus = BusinessGoodsSku::query()->where('shop_id', $shop->id)->where('external_sku_id', $event->businessOrderItem['external_sku_id'])->get();
|
||||||
foreach ($businessGoodsSkus as $businessGoodsSku) {
|
foreach ($businessGoodsSkus as $businessGoodsSku) {
|
||||||
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku->toArray(), $num, $isIncremental);
|
BusinessGoodsSkuIncrQuantity::dispatch($shop, $businessGoodsSku->toArray(), $num, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user