From b583389c24c00c0e85b00f8b01d9b1413110780f Mon Sep 17 00:00:00 2001 From: weigang Date: Tue, 22 Sep 2020 12:21:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/GoodsActivityService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Service/v3/Implementations/GoodsActivityService.php b/app/Service/v3/Implementations/GoodsActivityService.php index 5bcfd2f..8888cf3 100644 --- a/app/Service/v3/Implementations/GoodsActivityService.php +++ b/app/Service/v3/Implementations/GoodsActivityService.php @@ -161,12 +161,12 @@ class GoodsActivityService implements GoodsActivityServiceInterface ]; foreach ($sourceGoods as $key => &$goods) { - if ($limitNums[$goods->type] == 0) { // 不限制同类购买商品种数,也就是可以同时购买多款不同商品 + if ($limitNums[$goods['type']] == 0) { // 不限制同类购买商品种数,也就是可以同时购买多款不同商品 continue; } - $buyNum[$goods->type] += 1; - if ($buyNum[$goods->type] > $limitNums[$goods->type]) { + $buyNum[$goods['type']] += 1; + if ($buyNum[$goods['type']] > $limitNums[$goods['type']]) { return false; } }