From 7625369a54410e90379a0b024ff08aeea0f13e64 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Thu, 17 Sep 2020 19:56:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=B4=AD=E7=89=A9=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/GoodsActivityService.php | 2 +- app/Service/v3/Implementations/GoodsService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Service/v3/Implementations/GoodsActivityService.php b/app/Service/v3/Implementations/GoodsActivityService.php index 8bb0ca1..68becdd 100644 --- a/app/Service/v3/Implementations/GoodsActivityService.php +++ b/app/Service/v3/Implementations/GoodsActivityService.php @@ -59,7 +59,7 @@ class GoodsActivityService implements GoodsActivityServiceInterface if (!$redis->exists($inventoryKey)) { $redis->set($inventoryKey, $num); } else { - $redis->incrBy($inventoryKey, $num); + $redis->incrBy($inventoryKey, intval($num)); } // 是否超过限购数量 diff --git a/app/Service/v3/Implementations/GoodsService.php b/app/Service/v3/Implementations/GoodsService.php index cb40273..3a7f0bb 100644 --- a/app/Service/v3/Implementations/GoodsService.php +++ b/app/Service/v3/Implementations/GoodsService.php @@ -49,7 +49,7 @@ class GoodsService implements GoodsServiceInterface if (!$redis->exists($inventoryKey)) { $redis->set($inventoryKey, $num); } else { - $redis->incrBy($inventoryKey, $num); + $redis->incrBy($inventoryKey, intval($num)); } // 是否超过限购数量