!67 库存更新优化

Merge pull request !67 from develop
This commit is contained in:
赵世界 2022-08-24 11:41:47 +00:00 committed by Gitee
commit 768aa01f52
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -20,7 +20,7 @@ class Goods
{ {
return [ return [
'data' => [ 'data' => [
'stock' => $quantity, 'stock' => max($quantity, 0),
'business_sku_id' => $businessGoods['sku_id'], 'business_sku_id' => $businessGoods['sku_id'],
'business_goods_id' => $businessGoods['goods_id'], 'business_goods_id' => $businessGoods['goods_id'],
'erp_shop_id' => $shopId, 'erp_shop_id' => $shopId,