diff --git a/app/Service/v3/Implementations/GoodsActivityService.php b/app/Service/v3/Implementations/GoodsActivityService.php index 97ce98c..c60a231 100644 --- a/app/Service/v3/Implementations/GoodsActivityService.php +++ b/app/Service/v3/Implementations/GoodsActivityService.php @@ -49,8 +49,8 @@ class GoodsActivityService implements GoodsActivityServiceInterface // 商品库存不足 // 获取冻结的库存 - //$inventoryFrozen = (int)$redis->get($inventoryKey); - $inventoryFrozen = 0; + $inventoryFrozen = (int)$redis->get($inventoryKey); + // $inventoryFrozen = 0; if($goods->is_infinite != 1 && $goods->inventory < ($num+$inventoryFrozen)){ return ErrorCode::GOODS_ACTIVITY_INVENTORY_ERROR; } diff --git a/app/Service/v3/Implementations/GoodsService.php b/app/Service/v3/Implementations/GoodsService.php index 996248f..a00ca11 100644 --- a/app/Service/v3/Implementations/GoodsService.php +++ b/app/Service/v3/Implementations/GoodsService.php @@ -40,8 +40,8 @@ class GoodsService implements GoodsServiceInterface } // 商品库存不足 // 获取冻结的库存 - //$inventoryFrozen = (int)$redis->get($inventoryKey); - $inventoryFrozen = 0; + $inventoryFrozen = (int)$redis->get($inventoryKey); + // $inventoryFrozen = 0; if($goods->is_infinite != 1 && $goods->inventory < ($num+$inventoryFrozen)){ return ErrorCode::GOODS_INVENTORY_ERROR; }