diff --git a/webapp/services/HashRateShopService.php b/webapp/services/HashRateShopService.php index 97fdf8bd..beaf950a 100644 --- a/webapp/services/HashRateShopService.php +++ b/webapp/services/HashRateShopService.php @@ -58,6 +58,11 @@ class HashRateShopService { public static function buyLimitCheck($goodsMeta, $goodsNum, &$errCode, &$errMsg) { + if ($goodsMeta['is_close']) { + $errCode = 1; + $errMsg = 'cant buy'; + return; + } $errCode = 0; $errMsg = ''; $buyRecordHash = ShopBuyRecord::allToHash(); @@ -90,7 +95,7 @@ class HashRateShopService { $boughtTimes = $buyRecord ? $buyRecord['this_month_buy_times'] + $goodsNum : 1; if ($buyRecord && getXVal($buyRecord, 'this_month_buy_times', 0) >= $goodsMeta['limit_num']) { $errCode = 2; - $errMsg = 'month purchase limit reached'; + $errMsg = 'Month purchase limit reached'; return false; } }