Commit 8f740ad1 authored by zw's avatar zw

放出高峰限制

parent 3f7a24b0
......@@ -64,18 +64,7 @@ class VerifyRepetitionService
if (!$this->redis_) {
return true;
}
/*$time = 20;
$record_click = $this->redis_->get("record_click_" .$agent_id);
if (!$record_click ) {
$this->redis_->set("record_click_" .$agent_id, 1, $time);
} elseif( $record_click < 3) {
$this->redis_->incr("record_click_" .$agent_id);
}else{
//兼容出现永久请勿频繁请求问题
//$this->redis_->set("record_click_" .$agent_id, 3, 5);
return false;
}*/
$is_bool = $this->getCurrTimeSection();
/* $is_bool = $this->getCurrTimeSection();
if($is_bool){
$time = 10;
$record_click = $this->redis_->get("record_click_" .$agent_id);
......@@ -84,7 +73,7 @@ class VerifyRepetitionService
} else{
return false;
}
}else{
}else{*/
$time = 20;
$record_click = $this->redis_->get("record_click_" .$agent_id);
if (!$record_click ) {
......@@ -96,13 +85,14 @@ class VerifyRepetitionService
$this->redis_->set("record_click_" .$agent_id, 3, 5);
return false;
}
}
// }
return true;
}
public function getCurrTimeSection()
{
return false;
$checkDayStr = date('Y-m-d ', time());
$timeBegin1 = strtotime($checkDayStr . "18:30" . ":00");
$timeEnd1 = strtotime($checkDayStr . "20:30" . ":00");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment