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
4ec7739f
Commit
4ec7739f
authored
Jan 12, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑客户详情权限
parent
39fbfb9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
15 deletions
+42
-15
UserLogService.php
application/index/service/UserLogService.php
+20
-15
UserService.php
application/index/service/UserService.php
+22
-0
No files found.
application/index/service/UserLogService.php
View file @
4ec7739f
...
@@ -266,10 +266,10 @@ class UserLogService
...
@@ -266,10 +266,10 @@ class UserLogService
#拨打电话按钮是否显示 0:显示 1:不显示
#拨打电话按钮是否显示 0:显示 1:不显示
$result
[
'is_phone_button_show'
]
=
$this
->
isPhoneButtonShow
(
$user_id
,
$result
[
'user_phone'
],
$result
[
"agent_id"
],
$agent_id
,
$result
[
'vip'
]);
$result
[
'is_phone_button_show'
]
=
$this
->
isPhoneButtonShow
(
$user_id
,
$result
[
'user_phone'
],
$result
[
"agent_id"
],
$agent_id
,
$result
[
'vip'
]);
// $result['is_phone_button_show'] = 0;
big_log
(
'拨打电话按钮是否显示 0:显示 1:不显示'
);
big_log
(
$result
[
'is_phone_button_show'
]);
#编辑客户详情权限 0:有权限 1:无权限
big_log
(
'拨打电话按钮是否显示'
);
$result
[
'is_can_edit_user_info'
]
=
$user_service
->
isCanEditUserInfo
(
$result
[
"agent_id"
],
$agent_id
);
return
$result
;
return
$result
;
}
}
...
@@ -289,6 +289,11 @@ class UserLogService
...
@@ -289,6 +289,11 @@ class UserLogService
$is_phone_button_show
=
0
;
$is_phone_button_show
=
0
;
$user_service
=
new
UserService
();
$user_service
=
new
UserService
();
if
(
$result_agent_id
==
$agent_id
){
big_log
(
'0 客方 '
);
return
$is_phone_button_show
;
}
if
(
$is_vip
==
1
){
if
(
$is_vip
==
1
){
$is_phone_button_show
=
1
;
$is_phone_button_show
=
1
;
...
@@ -342,11 +347,11 @@ class UserLogService
...
@@ -342,11 +347,11 @@ class UserLogService
#是否有权限查看vip客户 0:可查看 1:不可查看
#是否有权限查看vip客户 0:可查看 1:不可查看
$examine_vip
=
$vip_services
->
vip
(
$agent_id
);
$examine_vip
=
$vip_services
->
vip
(
$agent_id
);
if
(
$examine_vip
==
0
){
if
(
$examine_vip
==
0
and
$is_vip
==
1
){
big_log
(
'6
是否有权限查看vip客户 有权限
'
);
big_log
(
'6
有查看vip客户权限
'
);
$is_phone_button_show
=
0
;
$is_phone_button_show
=
0
;
}
else
{
}
else
{
big_log
(
'6
是否有权限查看vip客户 无
'
);
big_log
(
'6
无查看vip客户权限
'
);
}
}
return
$is_phone_button_show
;
return
$is_phone_button_show
;
...
@@ -381,21 +386,21 @@ class UserLogService
...
@@ -381,21 +386,21 @@ class UserLogService
* @param $agent_id
* @param $agent_id
* @return int
* @return int
*/
*/
/*
public function userDetailIsOutpaceCallNum($user_id,$user_phone, $agent_id)
public
function
userDetailIsOutpaceCallNum
(
$user_id
,
$user_phone
,
$agent_id
)
{
{
$is_outpace_call_num
=
0
;
$is_outpace_call_num
=
0
;
$clientService
=
new
ClientService
();
$clientService
=
new
ClientService
();
if
(
!
$clientService
->
dialTotal
(
$user_id
))
{
if
(
!
$clientService
->
dialTotal
(
$user_id
))
{
$is_outpace_call_num
=
1
;
$is_outpace_call_num
=
1
;
}
}
$agent_res = $this->agentModel->searchAgentsByKeyword("id,name,phone", ["id" => $agent_id]);
//
$agent_res = $this->agentModel->searchAgentsByKeyword("id,name,phone", ["id" => $agent_id]);
$call = new CallPhoneService();
//
$call = new CallPhoneService();
$bind_num_res = $call->getBindNum($user_phone, $agent_res[0]['phone']);
//
$bind_num_res = $call->getBindNum($user_phone, $agent_res[0]['phone']);
if ($bind_num_res != 0) {
//
if ($bind_num_res != 0) {
$is_outpace_call_num = 0;
//
$is_outpace_call_num = 0;
}
//
}
return
$is_outpace_call_num
;
return
$is_outpace_call_num
;
}
*/
}
public
function
userDetailIsOutpaceCallNum5
(
$user_id
)
public
function
userDetailIsOutpaceCallNum5
(
$user_id
)
{
{
...
...
application/index/service/UserService.php
View file @
4ec7739f
...
@@ -355,6 +355,28 @@ class UserService
...
@@ -355,6 +355,28 @@ class UserService
}
}
}
}
/**
* 编辑客户详情权限 0:有权限 1:无权限
* @param $user_agent_id
* @param $agent_id
* @return int
*/
public
function
isCanEditUserInfo
(
$user_agent_id
,
$agent_id
){
$is_can_edit_user_info
=
1
;
if
(
$user_agent_id
==
$agent_id
){
$is_can_edit_user_info
=
0
;
}
$s_vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$s_vip
->
vip
(
$agent_id
,
'removeUserBind'
);
if
(
$is_can_edit
==
0
)
{
$is_can_edit_user_info
=
0
;
}
return
$is_can_edit_user_info
;
}
/**
/**
* 设置或者更新客户保护期
* 设置或者更新客户保护期
* @return mixed
* @return mixed
...
...
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