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
e5e1a607
Commit
e5e1a607
authored
Oct 09, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
原盘重盘重置
parent
6179dc0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
UserService.php
application/index/service/UserService.php
+27
-0
No files found.
application/index/service/UserService.php
View file @
e5e1a607
...
@@ -902,6 +902,7 @@ class UserService
...
@@ -902,6 +902,7 @@ class UserService
}
}
$this
->
user
->
updateUsers
(
$id
,
$params_
);
$this
->
user
->
updateUsers
(
$id
,
$params_
);
}
}
$this
->
removeUserBindType
(
$user_id
);
//原盘重盘重置
$redis_service
=
new
RedisCacheService
();
$redis_service
=
new
RedisCacheService
();
$redis_service
->
userCache
(
$user_id
);
$redis_service
->
userCache
(
$user_id
);
$redis_service
->
userCache
(
$now_user_id
);
$redis_service
->
userCache
(
$now_user_id
);
...
@@ -1031,4 +1032,29 @@ class UserService
...
@@ -1031,4 +1032,29 @@ class UserService
return
true
;
return
true
;
}
}
/**
* 还原 原盘重盘
* @param $user_id
* @return bool
*/
public
function
removeUserBindType
(
$user_id
)
{
$user_bind_type
=
$this
->
user
->
getUserByWhereValue
(
'bind_type'
,
[
'id'
=>
$user_id
]);
if
(
$user_bind_type
==
1
){
//当前用户是原盘的还原全部设置
$s_user_call
=
new
UserCallStintService
();
$user_list
=
$s_user_call
->
getUserBindList
(
$user_id
);
if
(
!
$user_list
or
(
count
(
$user_list
)
<
2
)){
return
false
;
}
foreach
(
$user_list
as
$k
=>
$v
)
{
$this
->
user
->
updateUsers
(
$v
,
[
'bind_type'
=>
0
]);
}
}
else
{
//
$this
->
user
->
updateUsers
(
$user_id
,
[
'bind_type'
=>
0
]);
}
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