|
|
@@ -814,7 +814,10 @@ class User extends BaseController
|
|
814
|
814
|
public function changePro($id,UserRepository $repository)
|
|
815
|
815
|
{
|
|
816
|
816
|
$spread_account = $this->request->param('spread_account');
|
|
817
|
|
- if($repository->update_spread($id,$spread_account)){
|
|
|
817
|
+ $adminId = $this->request->adminId();
|
|
|
818
|
+ $spreadId = $this->request->param('spreadId');
|
|
|
819
|
+ $mark = '后台管理员修改用户推荐人';
|
|
|
820
|
+ if($repository->update_spread($id,$spread_account,$adminId,$mark,$spreadId)){
|
|
818
|
821
|
return app('json')->success("修改成功");
|
|
819
|
822
|
}else{
|
|
820
|
823
|
return app('json')->fail("失败");
|
|
|
@@ -844,17 +847,18 @@ class User extends BaseController
|
|
844
|
847
|
* cabbage
|
|
845
|
848
|
* 2020-11-04
|
|
846
|
849
|
* */
|
|
847
|
|
- public function changeProLevel($id,UserRepository $repository)
|
|
848
|
|
- {
|
|
|
850
|
+ public function changeProLevel($id,UserRepository $repository) {
|
|
849
|
851
|
$level_account = $this->request->param('level_account');
|
|
|
852
|
+ $adminId = $this->request->adminId();
|
|
|
853
|
+ $levelId = $this->request->levelId();
|
|
|
854
|
+ $mark = '后台管理员修改用户节点人';
|
|
850
|
855
|
if (!$id) {
|
|
851
|
856
|
return app('json')->fail("参数丢失");
|
|
852
|
857
|
}
|
|
853
|
|
- if($repository->update_level_uid($id,$level_account)){
|
|
|
858
|
+ if($repository->update_level_uid($id,$adminId,$levelId,$level_account,$mark)){
|
|
854
|
859
|
return app('json')->success("修改成功");
|
|
855
|
860
|
}else{
|
|
856
|
|
- return app('json')->fail("失败");
|
|
857
|
|
- }
|
|
|
861
|
+ return app('json')->fail("失败"); }
|
|
858
|
862
|
}
|
|
859
|
863
|
|
|
860
|
864
|
/**
|
|
|
@@ -869,14 +873,14 @@ class User extends BaseController
|
|
869
|
873
|
}
|
|
870
|
874
|
public function changeProGroup($id,UserRepository $repository)
|
|
871
|
875
|
{
|
|
872
|
|
- $adminid = $this->request->adminId();
|
|
|
876
|
+ $adminId = $this->request->adminId();
|
|
873
|
877
|
$old_identity_id = $this->request->param('old_identity_id');
|
|
874
|
878
|
$new_identity_id = $this->request->param('new_identity_id');
|
|
875
|
879
|
$mark = $this->request->param('mark');
|
|
876
|
880
|
if (empty($id) || empty($old_identity_id) || empty($new_identity_id)) {
|
|
877
|
881
|
return app('json')->fail("参数丢失");
|
|
878
|
882
|
}
|
|
879
|
|
- if ($repository->update_user_group($id, $old_identity_id, $new_identity_id, $adminid, $mark)) {
|
|
|
883
|
+ if ($repository->update_user_group($id, $old_identity_id, $new_identity_id, $adminId, $mark)) {
|
|
880
|
884
|
return app('json')->success("修改成功");
|
|
881
|
885
|
} else {
|
|
882
|
886
|
return app('json')->fail("失败");
|
|
|
@@ -2008,7 +2012,7 @@ class User extends BaseController
|
|
2008
|
2012
|
return app('json')->success('查询成功', $userData);
|
|
2009
|
2013
|
}
|
|
2010
|
2014
|
/**
|
|
2011
|
|
- * 获取用户操作记录
|
|
|
2015
|
+ * 用户操作记录
|
|
2012
|
2016
|
*/
|
|
2013
|
2017
|
public function getOperatingRecordList(){
|
|
2014
|
2018
|
$records = Db::name('user_operating_record')
|
|
|
@@ -2026,6 +2030,48 @@ class User extends BaseController
|
|
2026
|
2030
|
->toArray();
|
|
2027
|
2031
|
return app('json')->success($records, '获取成功');
|
|
2028
|
2032
|
}
|
|
|
2033
|
+ //用户身份修改记录
|
|
|
2034
|
+ public function getUserIdentityChangeRecord(){
|
|
|
2035
|
+ $uid = request()->param('uid');
|
|
|
2036
|
+ $records = Db::name('user_identity_change_records')
|
|
|
2037
|
+ ->field('operation_id, uid, old_identity_id, new_identity_id, mark, create_time');
|
|
|
2038
|
+ if($uid){
|
|
|
2039
|
+ $records->where('uid', $uid);
|
|
|
2040
|
+ }
|
|
|
2041
|
+ $query=$records
|
|
|
2042
|
+ ->order('r.create_time DESC')
|
|
|
2043
|
+ ->paginate(20)
|
|
|
2044
|
+ ->toArray();
|
|
|
2045
|
+ return app('json')->success($query, '获取成功');
|
|
|
2046
|
+ }
|
|
|
2047
|
+ //用户推荐人修改记录
|
|
|
2048
|
+ public function getUserSpreadChangeRecord(){
|
|
|
2049
|
+ $uid = request()->param('uid');
|
|
|
2050
|
+ $records = Db::name('user_identity_change_records')
|
|
|
2051
|
+ ->field('operation_id, uid, old_identity_id, new_identity_id, mark, create_time');
|
|
|
2052
|
+ if($uid){
|
|
|
2053
|
+ $records->where('uid', $uid);
|
|
|
2054
|
+ }
|
|
|
2055
|
+ $query=$records
|
|
|
2056
|
+ ->order('r.create_time DESC')
|
|
|
2057
|
+ ->paginate(20)
|
|
|
2058
|
+ ->toArray();
|
|
|
2059
|
+ return app('json')->success($query, '获取成功');
|
|
|
2060
|
+ }
|
|
|
2061
|
+ //用户节点人修改记录
|
|
|
2062
|
+ public function getUserLevelChangeRecord(){
|
|
|
2063
|
+ $uid = request()->param('uid');
|
|
|
2064
|
+ $records = Db::name('user_level_change_records')
|
|
|
2065
|
+ ->field('operation_id, uid, old_level_id, new_level_id, mark, create_time');
|
|
|
2066
|
+ if($uid){
|
|
|
2067
|
+ $records->where('uid', $uid);
|
|
|
2068
|
+ }
|
|
|
2069
|
+ $query=$records
|
|
|
2070
|
+ ->order('r.create_time DESC')
|
|
|
2071
|
+ ->paginate(20)
|
|
|
2072
|
+ ->toArray();
|
|
|
2073
|
+ return app('json')->success($query, '获取成功');
|
|
|
2074
|
+ }
|
|
2029
|
2075
|
/**
|
|
2030
|
2076
|
* 查询用户上下级
|
|
2031
|
2077
|
*/
|