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
e9f7a294
Commit
e9f7a294
authored
Aug 03, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
46877159
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
User.php
application/api_broker/controller/User.php
+1
-1
ClientService.php
application/api_broker/service/ClientService.php
+8
-7
BindingPhone.php
application/model/BindingPhone.php
+9
-0
No files found.
application/api_broker/controller/User.php
View file @
e9f7a294
...
...
@@ -127,7 +127,7 @@ class User extends Basic
$clientService
=
new
ClientService
();
$list
=
[];
foreach
(
$userList
as
$k
=>
$v
)
{
$is_show
=
$clientService
->
dialTotal
(
$v
[
"user_
id
"
]);
$is_show
=
$clientService
->
dialTotal
(
$v
[
"user_
phone
"
]);
if
(
$is_show
)
{
array_push
(
$list
,
$v
);
}
...
...
application/api_broker/service/ClientService.php
View file @
e9f7a294
...
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\service
;
use
app\extra\RedisExt
;
use
app\model\BindingPhone
;
use
app\model\UPhoneFollowPp
;
/**
...
...
@@ -14,16 +15,16 @@ use app\model\UPhoneFollowPp;
*/
class
ClientService
{
private
$
uPhoneFollowUp
Model
;
private
$
bindingPhone
Model
;
private
$redis
;
public
function
__construct
()
{
$this
->
uPhoneFollowUpModel
=
new
UPhoneFollowPp
();
$this
->
redis
=
RedisExt
::
getRedis
();
$this
->
bindingPhoneModel
=
new
BindingPhone
();
$this
->
redis
=
RedisExt
::
getRedis
();
}
public
function
dialTotal
(
$user_
id
)
public
function
dialTotal
(
$user_
phone
)
{
$day
=
1
;
$num
=
5
;
...
...
@@ -31,13 +32,13 @@ class ClientService
$day
=
$this
->
redis
->
get
(
"s_agent_call_day"
);
$num
=
$this
->
redis
->
get
(
"s_agent_call_number"
);
}
$start_time
=
date
(
"Y-m-d H:i:s"
,
strtotime
(
"-
$day
day"
));
$end_time
=
date
(
"Y-m-d H:i:s"
,
time
());
$params
[
"create_time"
]
=
array
(
"between"
,
array
(
$start_time
,
$end_time
)
);
$params
[
"
user_id"
]
=
$user_id
;
$params
[
"
phone_b"
]
=
$user_phone
;
$total
=
$this
->
uPhoneFollowUpModel
->
getCount
(
$params
);
$total
=
$this
->
bindingPhoneModel
->
getCount
(
$params
);
if
(
$total
>
$num
)
{
return
false
;
}
else
{
...
...
application/model/BindingPhone.php
View file @
e9f7a294
...
...
@@ -179,4 +179,12 @@ class BindingPhone extends BaseModel
$insert_data
[
'status'
]
=
$status
;
return
$this
->
insert
(
$insert_data
);
}
public
function
getCount
(
$where
)
{
$r
=
$this
->
where
(
$where
)
->
count
();
return
$r
;
}
}
\ 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