|
|
@@ -814,10 +814,8 @@ class User extends BaseController
|
|
814
|
814
|
public function changePro($id,UserRepository $repository)
|
|
815
|
815
|
{
|
|
816
|
816
|
$spread_account = $this->request->param('spread_account');
|
|
817
|
|
- $adminId = $this->request->adminId();
|
|
818
|
|
- $spreadId = $this->request->param('spreadId');
|
|
819
|
817
|
$mark = '后台管理员修改用户推荐人';
|
|
820
|
|
- if($repository->update_spread($id,$spread_account,$adminId,$mark,$spreadId)){
|
|
|
818
|
+ if($repository->update_spread($id,$spread_account,$mark)){
|
|
821
|
819
|
return app('json')->success("修改成功");
|
|
822
|
820
|
}else{
|
|
823
|
821
|
return app('json')->fail("失败");
|
|
|
@@ -849,13 +847,12 @@ class User extends BaseController
|
|
849
|
847
|
* */
|
|
850
|
848
|
public function changeProLevel($id,UserRepository $repository) {
|
|
851
|
849
|
$level_account = $this->request->param('level_account');
|
|
852
|
|
- $adminId = $this->request->adminId();
|
|
853
|
850
|
$levelId = $this->request->levelId();
|
|
854
|
851
|
$mark = '后台管理员修改用户节点人';
|
|
855
|
852
|
if (!$id) {
|
|
856
|
853
|
return app('json')->fail("参数丢失");
|
|
857
|
854
|
}
|
|
858
|
|
- if($repository->update_level_uid($id,$adminId,$levelId,$level_account,$mark)){
|
|
|
855
|
+ if($repository->update_level_uid($id,$levelId,$level_account,$mark)){
|
|
859
|
856
|
return app('json')->success("修改成功");
|
|
860
|
857
|
}else{
|
|
861
|
858
|
return app('json')->fail("失败"); }
|
|
|
@@ -2031,7 +2028,8 @@ class User extends BaseController
|
|
2031
|
2028
|
return app('json')->success($records, '获取成功');
|
|
2032
|
2029
|
}
|
|
2033
|
2030
|
//用户身份修改记录
|
|
2034
|
|
- public function getUserIdentityChangeRecord($uid){
|
|
|
2031
|
+ public function getUserIdentityChangeRecord($id){
|
|
|
2032
|
+ $uid = $id;
|
|
2035
|
2033
|
$records = Db::name('user_identity_change_records')
|
|
2036
|
2034
|
->field('operation_id, uid, old_identity_id, new_identity_id, mark, create_time');
|
|
2037
|
2035
|
if($uid){
|
|
|
@@ -2044,9 +2042,10 @@ class User extends BaseController
|
|
2044
|
2042
|
return app('json')->success($query, '获取成功');
|
|
2045
|
2043
|
}
|
|
2046
|
2044
|
//用户推荐人修改记录
|
|
2047
|
|
- public function getUserSpreadChangeRecord($uid){
|
|
|
2045
|
+ public function getUserSpreadChangeRecord($id){
|
|
|
2046
|
+ $uid = $id;
|
|
2048
|
2047
|
$records = Db::name('user_spread_change_records')
|
|
2049
|
|
- ->field('operation_id, uid, old_identity_id, new_identity_id, mark, create_time');
|
|
|
2048
|
+ ->field('operation_id, uid, old_spread_id, new_spread_id, mark, create_time');
|
|
2050
|
2049
|
if($uid){
|
|
2051
|
2050
|
$records->where('uid', $uid);
|
|
2052
|
2051
|
}
|
|
|
@@ -2057,7 +2056,8 @@ class User extends BaseController
|
|
2057
|
2056
|
return app('json')->success($query, '获取成功');
|
|
2058
|
2057
|
}
|
|
2059
|
2058
|
//用户节点人修改记录
|
|
2060
|
|
- public function getUserLevelChangeRecord($uid){
|
|
|
2059
|
+ public function getUserLevelChangeRecord($id){
|
|
|
2060
|
+ $uid = $id;
|
|
2061
|
2061
|
$records = Db::name('user_level_change_records')
|
|
2062
|
2062
|
->field('operation_id, uid, old_level_id, new_level_id, mark, create_time');
|
|
2063
|
2063
|
if($uid){
|
|
|
@@ -2072,8 +2072,11 @@ class User extends BaseController
|
|
2072
|
2072
|
/**
|
|
2073
|
2073
|
* 查询用户上下级
|
|
2074
|
2074
|
*/
|
|
2075
|
|
- public function getusersxj(){
|
|
2076
|
|
-
|
|
|
2075
|
+ public function getUserLevelList($id){
|
|
|
2076
|
+ $uid = $id;
|
|
|
2077
|
+ $records = Db::name('users')->where('uid',$uid)->field('level_id')->find();
|
|
|
2078
|
+ $query = Db::name('users')->where('level_id',$uid)->field('uid')->select()->toArray();
|
|
|
2079
|
+ return app('json')->success(['user_level' => $records, 'user_children' => $query], '获取成功');
|
|
2077
|
2080
|
}
|
|
2078
|
2081
|
|
|
2079
|
2082
|
}
|