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
bc580d5c
Commit
bc580d5c
authored
Jan 12, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户关联解绑
parent
f82e881e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
User.php
application/api_broker/controller/User.php
+2
-2
Member.php
application/index/controller/Member.php
+2
-2
UserService.php
application/index/service/UserService.php
+2
-2
No files found.
application/api_broker/controller/User.php
View file @
bc580d5c
...
...
@@ -930,12 +930,12 @@ class User extends Basic
*/
public
function
removeUserBind
()
{
if
(
empty
(
$this
->
params
[
'user_id'
]))
{
if
(
empty
(
$this
->
params
[
'user_id'
])
or
empty
(
$this
->
params
[
'now_user_id'
])
)
{
return
$this
->
response
(
101
,
'参数错误'
);
}
//解除
$s_index_user
=
new
UserService
();
$rm_res
=
$s_index_user
->
removeUserBind
(
$this
->
params
[
'user_id'
],
$this
->
agentId
);
$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"
,
"操作人不是客方"
);
...
...
application/index/controller/Member.php
View file @
bc580d5c
...
...
@@ -598,12 +598,12 @@ class Member extends Basic{
*/
public
function
removeUserBind
()
{
if
(
empty
(
$this
->
params
[
'user_id'
]))
{
if
(
empty
(
$this
->
params
[
'user_id'
])
or
empty
(
$this
->
params
[
'now_user_id'
])
)
{
return
$this
->
response
(
101
,
'参数错误'
);
}
//解除
$s_index_user
=
new
UserService
();
$rm_res
=
$s_index_user
->
removeUserBind
(
$this
->
params
[
'user_id'
],
$this
->
userId
);
$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"
,
"操作人不是客方"
);
...
...
application/index/service/UserService.php
View file @
bc580d5c
...
...
@@ -564,9 +564,9 @@ class UserService
* @param $user_id
* @return int|string
*/
public
function
removeUserBind
(
$user_id
,
$agent_id
){
public
function
removeUserBind
(
$
now_user_id
,
$
user_id
,
$agent_id
){
// 检查权限 客方自己 有权限的人
$user_agent_id
=
$this
->
user
->
getUserByWhereValue
(
'agent_id'
,
[
'id'
=>
$user_id
]);
$user_agent_id
=
$this
->
user
->
getUserByWhereValue
(
'agent_id'
,
[
'id'
=>
$
now_
user_id
]);
if
(
$user_agent_id
[
'agent_id'
!=
$agent_id
]){
return
1
;
//操作人不是客方
}
...
...
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