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
d60b871f
Commit
d60b871f
authored
Oct 12, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
04184c20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
UserService.php
application/index/service/UserService.php
+27
-2
No files found.
application/index/service/UserService.php
View file @
d60b871f
...
@@ -796,8 +796,8 @@ class UserService
...
@@ -796,8 +796,8 @@ class UserService
/**
/**
* 新增客户绑定
* 新增客户绑定
* @param $user_id
* @param $user_id
(当前客户ID 客户详情页客户ID)
* @param $bind_id
* @param $bind_id
(待绑定客户ID 搜索出来的客户ID)
* @return int
* @return int
*/
*/
public
function
addUserBind
(
$user_id
,
$bind_id
,
$agent_id
){
public
function
addUserBind
(
$user_id
,
$bind_id
,
$agent_id
){
...
@@ -838,6 +838,9 @@ class UserService
...
@@ -838,6 +838,9 @@ class UserService
$params_
[
'bind_id'
]
=
$params_bind_id
;
$params_
[
'bind_id'
]
=
$params_bind_id
;
$res
=
$this
->
user
->
updateUsers
(
$params_user_id
,
$params_
);
$res
=
$this
->
user
->
updateUsers
(
$params_user_id
,
$params_
);
if
(
$res
==
1
){
if
(
$res
==
1
){
//设置原盘重盘
$this
->
addUserBindType
(
$user_id
,
$bind_id
);
$this
->
userDoLog
(
$params_user_id
,
$params_bind_id
,
$agent_id
,
1
);
$this
->
userDoLog
(
$params_user_id
,
$params_bind_id
,
$agent_id
,
1
);
$this
->
userDoLog
(
$params_bind_id
,
$params_user_id
,
$agent_id
,
1
);
$this
->
userDoLog
(
$params_bind_id
,
$params_user_id
,
$agent_id
,
1
);
$redis_service
=
new
RedisCacheService
();
$redis_service
=
new
RedisCacheService
();
...
@@ -848,6 +851,25 @@ class UserService
...
@@ -848,6 +851,25 @@ class UserService
}
}
}
}
/**
* 新增客户绑定 设置原盘重盘
* @param $user_id (当前客户ID 客户详情页客户ID)
* @param $bind_id (待绑定客户ID 搜索出来的客户ID)
* @return bool
*/
public
function
addUserBindType
(
$user_id
,
$bind_id
)
{
$user_bind_type
=
$this
->
user
->
getUserByWhereValue
(
'bind_type'
,
[
'id'
=>
$user_id
]);
if
((
$user_bind_type
==
1
)
or
(
$user_bind_type
==
2
)){
//当前客户设置过原盘 新增默认为重盘
$this
->
user
->
updateUsers
(
$bind_id
,
[
'bind_type'
=>
2
]);
}
else
{
//当前客户未设原盘 新增默认为未设置
$this
->
user
->
updateUsers
(
$bind_id
,
[
'bind_type'
=>
0
]);
}
return
true
;
}
/**
/**
* 记录操作日志
* 记录操作日志
* @param $user_id
* @param $user_id
...
@@ -1057,4 +1079,6 @@ class UserService
...
@@ -1057,4 +1079,6 @@ class UserService
return
true
;
return
true
;
}
}
}
}
\ 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