Browse Source

Merge branch 'phoenix' of http://120.24.33.109:11081/hyzjshwo/lanzu_api_hyperf into phoenix

master
Lemon 5 years ago
parent
commit
dcbf1509ca
  1. 4
      app/Service/v3/Implementations/GoodsActivityService.php
  2. 4
      app/Service/v3/Implementations/GoodsService.php

4
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;
}

4
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;
}

Loading…
Cancel
Save