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
3c7f58b2
Commit
3c7f58b2
authored
Oct 25, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
控制手机端经纪人刷跟进接口
parent
318b59f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+9
-0
VerifyRepetitionService.php
application/api_broker/service/VerifyRepetitionService.php
+23
-0
No files found.
application/api_broker/controller/HomePageLog.php
View file @
3c7f58b2
...
@@ -5,6 +5,8 @@ namespace app\api_broker\controller;
...
@@ -5,6 +5,8 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\UserExpiredTimeService
;
use
app\api_broker\service\UserExpiredTimeService
;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\GHousesFollowUp
;
use
app\model\GHousesFollowUp
;
...
@@ -50,6 +52,13 @@ class HomePageLog extends Basic
...
@@ -50,6 +52,13 @@ class HomePageLog extends Basic
"pageSize" => 15
"pageSize" => 15
);*/
);*/
$vrs
=
new
VerifyRepetitionService
();
$is_check
=
$vrs
->
followUpClick
(
$this
->
agentId
);
if
(
!
$is_check
){
return
$this
->
response
(
"101"
,
"请勿频繁请求"
);
}
if
(
empty
(
$params
[
'start_time'
])
||
empty
(
$params
[
'end_time'
]))
{
if
(
empty
(
$params
[
'start_time'
])
||
empty
(
$params
[
'end_time'
]))
{
return
$this
->
response
(
"101"
,
'请选择时间'
);
return
$this
->
response
(
"101"
,
'请选择时间'
);
}
}
...
...
application/api_broker/service/VerifyRepetitionService.php
View file @
3c7f58b2
...
@@ -54,4 +54,26 @@ class VerifyRepetitionService
...
@@ -54,4 +54,26 @@ class VerifyRepetitionService
}
}
}
}
/**
* 控制经纪人点击客户跟进次数
* @param $agent_id
* @return bool
*/
public
function
followUpClick
(
$agent_id
){
if
(
!
$this
->
redis_
)
{
return
true
;
}
$time
=
10
;
$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
{
return
false
;
}
return
true
;
}
}
}
\ No newline at end of file
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