From 164b2790b78fcb70bba41fb08465d48d8141bc58 Mon Sep 17 00:00:00 2001 From: weigang Date: Thu, 17 Sep 2020 22:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/GoodsActivityService.php | 4 ++-- app/Service/v3/Implementations/GoodsService.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }