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
bc4bd500
Commit
bc4bd500
authored
Jan 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询客户手机号
parent
bd6f66a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
5 deletions
+34
-5
PhoneFollowUpService.php
application/index/service/PhoneFollowUpService.php
+9
-5
UserLogService.php
application/index/service/UserLogService.php
+25
-0
No files found.
application/index/service/PhoneFollowUpService.php
View file @
bc4bd500
...
@@ -94,14 +94,18 @@ class PhoneFollowUpService
...
@@ -94,14 +94,18 @@ class PhoneFollowUpService
}
else
{
}
else
{
$data
=
$this
->
phoneFollowUp
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
$data
=
$this
->
phoneFollowUp
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
}
}
$s_user_service
=
new
UserService
();
$s_user_Log_service
=
new
UserLogService
();
foreach
(
$data
as
$k
=>
$v
)
{
#客户是否在保护期内(0:保护器内 1:超过保护期)
$data
[
$k
][
'is_outstrip_twenty_four_hours'
]
=
$s_user_service
->
isUserProtect
(
$v
[
'user_id'
]);
#客户是否在保护期内(0:保护器内 1:超过保护期)
#判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定(0允许拨打 1不允许拨打)
$user_service
=
new
UserService
();
//todo 查询客户手机号
$result
[
'is_outstrip_twenty_four_hours'
]
=
$user_service
->
isUserProtect
(
$user_id
);
$data
[
$k
][
'is_outpace_call_num'
]
=
$s_user_Log_service
->
userDetailIsOutpaceCallNum
(
$user_id
,
$result
[
'user_phone'
],
$agent_id
);
}
#判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定(0允许拨打 1不允许拨打)
$result
[
'is_outpace_call_num'
]
=
$this
->
userDetailIsOutpaceCallNum
(
$user_id
,
$result
[
'user_phone'
],
$agent_id
);
return
[
'code'
=>
'200'
,
'data'
=>
$data
];
return
[
'code'
=>
'200'
,
'data'
=>
$data
];
}
}
...
...
application/index/service/UserLogService.php
View file @
bc4bd500
...
@@ -210,4 +210,28 @@ class UserLogService
...
@@ -210,4 +210,28 @@ class UserLogService
return
$bargainData
;
return
$bargainData
;
}
}
/**
* 判断当天被拨打是否超过5次
* 同时判断是否当前经纪人跟当前客户是否有电话绑定
* @param $user_id
* @param $user_phone
* @param $agent_id
* @return int
*/
public
function
userDetailIsOutpaceCallNum
(
$user_id
,
$user_phone
,
$agent_id
)
{
$is_outpace_call_num
=
0
;
$clientService
=
new
ClientService
();
if
(
!
$clientService
->
dialTotal
(
$user_id
))
{
$is_outpace_call_num
=
1
;
}
$agent_res
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$agent_id
]);
$call
=
new
CallPhoneService
();
$bind_num_res
=
$call
->
getBindNum
(
$user_phone
,
$agent_res
[
0
][
'phone'
]);
if
(
$bind_num_res
!=
0
)
{
$is_outpace_call_num
=
0
;
}
return
$is_outpace_call_num
;
}
}
}
\ 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