This commit is contained in:
songliang 2023-07-03 13:28:42 +08:00
parent 2629b318bd
commit e7aada85af

View File

@ -1374,10 +1374,11 @@ class ShopController extends BaseAuthedController
}
}
$goods['free_num'] = 0;
if (!empty($goods['free_type'])) {
$count = $this->countFreeBuyTimes($goods['free_type'], $goods['id'], $goods['goods_id']);
$goods['free_num'] = $goods['free_num'] - $count;
} else {
$goods['free_num'] = 0;
}
$free_num = $goods['free_num'];