$batchId ])->find(); if(!$batchInfo){ return false; } //不限制 if(!$batchInfo['use_limit']){ return true; } $exchangeCount = \app\api\model\app\exchange\UseLog::getExchangeCount($userId,$batchId); if($exchangeCount < $batchInfo['use_limit']){ return true; } return false; } }