Browse Source

活动

master
weigang 6 years ago
parent
commit
b583389c24
  1. 6
      app/Service/v3/Implementations/GoodsActivityService.php

6
app/Service/v3/Implementations/GoodsActivityService.php

@ -161,12 +161,12 @@ class GoodsActivityService implements GoodsActivityServiceInterface
]; ];
foreach ($sourceGoods as $key => &$goods) { foreach ($sourceGoods as $key => &$goods) {
if ($limitNums[$goods->type] == 0) { // 不限制同类购买商品种数,也就是可以同时购买多款不同商品
if ($limitNums[$goods['type']] == 0) { // 不限制同类购买商品种数,也就是可以同时购买多款不同商品
continue; 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; return false;
} }
} }

Loading…
Cancel
Save