From 24d154faff3e6cac2cbb2a088a086ec5ee6a8445 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 31 Jul 2023 11:22:43 +0800 Subject: [PATCH] 1 --- webapp/services/ShopService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/services/ShopService.php b/webapp/services/ShopService.php index 5c4e8f83..08cdbd3a 100644 --- a/webapp/services/ShopService.php +++ b/webapp/services/ShopService.php @@ -40,17 +40,17 @@ class ShopService { array_push($goodsList, $goodsDto); switch ($goodsMeta['limit_type']) { case mt\Item::DAILY_BUY_LIMIT: { - $buyRecord = getXVal($buyRecordHash, $goodsMeta['id']); + $buyRecord = getXVal($buyRecordHash, $goodsMeta['goods_id']); $goodsDto['bought_times'] = $buyRecord ? $buyRecord['this_day_buy_times'] : 0; } break; case mt\Item::WEEKLY_BUY_LIMIT: { - $buyRecord = getXVal($buyRecordHash, $goodsMeta['id']); + $buyRecord = getXVal($buyRecordHash, $goodsMeta['goods_id']); $goodsDto['bought_times'] = $buyRecord ? $buyRecord['this_week_buy_times'] : 0; } break; case mt\Item::TOTAL_BUY_LIMIT: { - $buyRecord = getXVal($buyRecordHash, $goodsMeta['id']); + $buyRecord = getXVal($buyRecordHash, $goodsMeta['goods_id']); $goodsDto['bought_times'] = $buyRecord ? $buyRecord['total_buy_times'] : 0; } break; @@ -77,7 +77,7 @@ class ShopService { if (!empty($goods['free_type'])) { $count = self::getFreeBuyTimes($goodsMeta['free_type'], - $goodsMeta['id'], + $goodsMeta['goods_id'], $goodsMeta['goods_id']); $goodsDto['free_num'] = $goodsDto['free_num'] - $count; }