Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
8f740ad1
Commit
8f740ad1
authored
Jan 21, 2019
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放出高峰限制
parent
3f7a24b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
VerifyRepetitionService.php
application/api_broker/service/VerifyRepetitionService.php
+4
-14
No files found.
application/api_broker/service/VerifyRepetitionService.php
View file @
8f740ad1
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment