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
92025e9d
Commit
92025e9d
authored
Jan 11, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拨打电话按钮是否显示
parent
abfaf3fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
UserLogService.php
application/index/service/UserLogService.php
+27
-6
No files found.
application/index/service/UserLogService.php
View file @
92025e9d
...
...
@@ -240,7 +240,7 @@ class UserLogService
{
//查询客户详情
$field
=
'id as user_id,sex,user_pic,user_nick,user_name,user_phone,site_ids,agent_id,user_label,industry_type,price_demand,area_demand'
;
$field
=
'id as user_id,sex,user_pic,user_nick,user_name,user_phone,site_ids,agent_id,user_label,industry_type,price_demand,area_demand
,vip
'
;
$result
=
$this
->
userModel
->
getUserDetailStreamline
(
$user_id
,
$field
);
if
(
count
(
$result
)
<=
0
)
{
...
...
@@ -257,21 +257,42 @@ class UserLogService
#是否被收藏
$result
[
"is_collect"
]
=
$this
->
userDetailIsCollect
(
$user_id
,
$agent_id
);
#拨打电话按钮是否显示
$result
[
'is_phone_button_show'
]
=
$this
->
isPhoneButtonShow
(
$user_id
,
$result
[
'user_phone'
],
$result
[
"agent_id"
],
$agent_id
);
return
$result
;
}
/**
* 拨打电话按钮是否显示
* @param $user_id
* @param $result_user_phone
* @param $result_agent_id
* @param $agent_id
* @return int
*/
public
function
isPhoneButtonShow
(
$user_id
,
$result_user_phone
,
$result_agent_id
,
$agent_id
)
{
$is_phone_button_show
=
1
;
#客户是否在保护期内(0:保护器内 1:超过保护期)
$user_service
=
new
UserService
();
$
result
[
'is_outstrip_twenty_four_hours'
]
=
$user_service
->
isUserProtect
(
$user_id
);
$
is_outstrip_twenty_four_hours
=
$user_service
->
isUserProtect
(
$user_id
);
#判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定(0允许拨打 1不允许拨打)
$
result
[
'is_outpace_call_num'
]
=
$this
->
userDetailIsOutpaceCallNum
(
$user_id
,
$result
[
'user_phone'
]
,
$agent_id
);
$
is_outpace_call_num
=
$this
->
userDetailIsOutpaceCallNum
(
$user_id
,
$result_user_phone
,
$agent_id
);
#查询当前经纪人是否是某个客方的总监 0:可查看 1:不可查看
$
result
[
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$result
[
"agent_id"
]
,
$agent_id
);
$
is_can_look
=
$user_service
->
isUserAgentDirector
(
$result_agent_id
,
$agent_id
);
$vip_services
=
new
VipService
();
#是否有权限查看vip客户 0:可查看 1:不可查看
$
result
[
'examine_vip'
]
=
$vip_services
->
vip
(
$agent_id
);
$
examine_vip
=
$vip_services
->
vip
(
$agent_id
);
return
$result
;
if
(
$is_outstrip_twenty_four_hours
==
0
or
$is_outpace_call_num
==
0
or
$is_can_look
==
0
or
$examine_vip
==
0
){
$is_phone_button_show
=
0
;
}
return
$is_phone_button_show
;
}
/**
...
...
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