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
8b7e7353
Commit
8b7e7353
authored
Jan 14, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户解绑
parent
29c1041c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
User.php
application/api_broker/controller/User.php
+3
-3
Member.php
application/index/controller/Member.php
+3
-3
UserService.php
application/index/service/UserService.php
+4
-6
No files found.
application/api_broker/controller/User.php
View file @
8b7e7353
...
...
@@ -937,9 +937,9 @@ class User extends Basic
$s_index_user
=
new
UserService
();
$rm_res
=
$s_index_user
->
removeUserBind
(
$this
->
params
[
'now_user_id'
],
$this
->
params
[
'user_id'
],
$this
->
agentId
);
switch
(
$rm_res
)
{
case
1
:
return
$this
->
response
(
"300"
,
"操作人不是客方"
);
break
;
//
case 1 :
//
return $this->response("300", "操作人不是客方");
//
break;
case
2
:
return
$this
->
response
(
"300"
,
"无解除关联权限权限"
);
break
;
...
...
application/index/controller/Member.php
View file @
8b7e7353
...
...
@@ -605,9 +605,9 @@ class Member extends Basic{
$s_index_user
=
new
UserService
();
$rm_res
=
$s_index_user
->
removeUserBind
(
$this
->
params
[
'now_user_id'
],
$this
->
params
[
'user_id'
],
$this
->
userId
);
switch
(
$rm_res
)
{
case
1
:
return
$this
->
response
(
"300"
,
"操作人不是客方"
);
break
;
//
case 1 :
//
return $this->response("300", "操作人不是客方");
//
break;
case
2
:
return
$this
->
response
(
"300"
,
"无解除关联权限权限"
);
break
;
...
...
application/index/service/UserService.php
View file @
8b7e7353
...
...
@@ -589,15 +589,13 @@ class UserService
public
function
removeUserBind
(
$now_user_id
,
$user_id
,
$agent_id
){
// 检查权限 客方自己 有权限的人
$user_agent_id
=
$this
->
user
->
getUserByWhereValue
(
'agent_id'
,
[
'id'
=>
$now_user_id
]);
if
(
$user_agent_id
!=
$agent_id
){
return
1
;
//操作人不是客方
}
$s_vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$s_vip
->
vip
(
$agent_id
,
'removeUserBind'
);
if
(
$is_can_edit
==
1
and
(
$user_agent_id
!=
$agent_id
))
{
$is_can_edit
=
$s_vip
->
vip
(
$agent_id
,
'removeUserBind'
);
//0:有权限 1:无权限
if
(
(
$is_can_edit
==
1
)
&&
(
$user_agent_id
!=
$agent_id
))
{
return
2
;
//无解除关联权限权限
}
// 客户bind_id不等于0才能解绑并记录日志
$user_info
=
$this
->
user
->
getUserById
(
$field
=
'bind_id'
,
$user_id
);
if
(
$user_info
[
'bind_id'
]
==
0
){
...
...
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