|
|
@@ -814,9 +814,16 @@ 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
|
+ $adminInfo = $this->request->adminInfo();
|
|
|
819
|
+ $operation = $adminInfo['account'].'修改用户推荐人';
|
|
|
820
|
+ $mark = $this->request->param('mark');
|
|
|
821
|
+ if (!empty($mark)) {
|
|
|
822
|
+ $mark = "($mark)";
|
|
|
823
|
+ }
|
|
|
824
|
+ $mark = $operation.$mark;
|
|
817
|
825
|
$olld_id = Db::name('user')->where('uid', $id)->value('spread_uid')??0;
|
|
818
|
|
- $mark = '后台管理员修改用户推荐人';
|
|
819
|
|
- if($repository->update_spread($id,$spread_account,$mark,$olld_id)){
|
|
|
826
|
+ if($repository->update_spread($id,$spread_account,$mark,$olld_id,$adminId)){
|
|
820
|
827
|
return app('json')->success("修改成功");
|
|
821
|
828
|
}else{
|
|
822
|
829
|
return app('json')->fail("失败");
|
|
|
@@ -848,13 +855,19 @@ class User extends BaseController
|
|
848
|
855
|
* */
|
|
849
|
856
|
public function changeProLevel($id,UserRepository $repository) {
|
|
850
|
857
|
$level_account = $this->request->param('level_account');
|
|
851
|
|
- $level_account_old = $this->request->param('level_account_old');
|
|
852
|
|
- $account = explode('(', $level_account_old)[0];
|
|
853
|
|
- $mark = '后台管理员修改用户节点人';
|
|
|
858
|
+ $olld_id = Db::name('user')->where('uid', $id)->value('level_id')??0;
|
|
|
859
|
+ $adminId = $this->request->adminId();
|
|
|
860
|
+ $adminInfo = $this->request->adminInfo();
|
|
|
861
|
+ $operation = $adminInfo['account'].'修改用户节点人';
|
|
|
862
|
+ $mark = $this->request->param('mark');
|
|
|
863
|
+ if (!empty($mark)) {
|
|
|
864
|
+ $mark = "($mark)";
|
|
|
865
|
+ }
|
|
|
866
|
+ $mark = $operation.$mark;
|
|
854
|
867
|
if (!$id) {
|
|
855
|
868
|
return app('json')->fail("参数丢失");
|
|
856
|
869
|
}
|
|
857
|
|
- if($repository->update_level_uid($id,$account,$level_account,$mark)){
|
|
|
870
|
+ if($repository->update_level_uid($id,$olld_id,$level_account,$mark,$adminId)){
|
|
858
|
871
|
return app('json')->success("修改成功");
|
|
859
|
872
|
}else{
|
|
860
|
873
|
return app('json')->fail("失败"); }
|
|
|
@@ -872,10 +885,16 @@ class User extends BaseController
|
|
872
|
885
|
}
|
|
873
|
886
|
public function changeProGroup($id,UserRepository $repository)
|
|
874
|
887
|
{
|
|
875
|
|
- $adminId = $this->request->adminId();
|
|
876
|
888
|
$old_identity_id = $this->request->param('old_identity_id');
|
|
877
|
889
|
$new_identity_id = $this->request->param('new_identity_id');
|
|
|
890
|
+ $adminId = $this->request->adminId();
|
|
|
891
|
+ $adminInfo = $this->request->adminInfo();
|
|
|
892
|
+ $operation = $adminInfo['account'].'修改用户身份';
|
|
878
|
893
|
$mark = $this->request->param('mark');
|
|
|
894
|
+ if (!empty($mark)) {
|
|
|
895
|
+ $mark = "($mark)";
|
|
|
896
|
+ }
|
|
|
897
|
+ $mark = $operation.$mark;
|
|
879
|
898
|
if (empty($id) || empty($old_identity_id) || empty($new_identity_id)) {
|
|
880
|
899
|
return app('json')->fail("参数丢失");
|
|
881
|
900
|
}
|
|
|
@@ -2034,8 +2053,8 @@ class User extends BaseController
|
|
2034
|
2053
|
$uid = $id;
|
|
2035
|
2054
|
$records = Db::name('user_identity_change_records')
|
|
2036
|
2055
|
->alias('r')
|
|
2037
|
|
- ->join('user u', 'u.uid = r.uid', 'LEFT')
|
|
2038
|
|
- ->field('r.operation_id, r.uid, u.nickname, u.account, r.old_identity_id, r.new_identity_id, r.mark, r.create_time');
|
|
|
2056
|
+ ->join('user u', 'r.uid = u.uid', 'LEFT')
|
|
|
2057
|
+ ->field('r.operation_id,r.old_identity_id,r.uid,r.new_identity_id,r.mark,r.create_time,u.nickname,u.account');
|
|
2039
|
2058
|
if($uid){
|
|
2040
|
2059
|
$records->where('r.uid', $uid);
|
|
2041
|
2060
|
}
|
|
|
@@ -2050,8 +2069,9 @@ class User extends BaseController
|
|
2050
|
2069
|
$uid = $id;
|
|
2051
|
2070
|
$records = Db::name('user_spread_change_records')
|
|
2052
|
2071
|
->alias('r')
|
|
2053
|
|
- ->join('user u', 'u.uid = r.uid', 'LEFT')
|
|
2054
|
|
- ->field('r.operation_id, r.uid, u.nickname, u.account, r.old_spread_id, r.new_spread_id, r.mark, r.create_time');
|
|
|
2072
|
+ ->join('user u', 'u.uid = r.old_spread_id', 'LEFT')
|
|
|
2073
|
+ ->join('user ua', 'ua.uid = r.new_spread_id', 'LEFT')
|
|
|
2074
|
+ ->field('r.operation_id,r.uid,u.account as old_account,ua.account as new_account,r.mark, r.create_time');
|
|
2055
|
2075
|
|
|
2056
|
2076
|
if ($uid) {
|
|
2057
|
2077
|
$records->where('r.uid', $uid);
|
|
|
@@ -2070,8 +2090,9 @@ class User extends BaseController
|
|
2070
|
2090
|
$uid = $id;
|
|
2071
|
2091
|
$records = Db::name('user_level_change_records')
|
|
2072
|
2092
|
->alias('r')
|
|
2073
|
|
- ->join('user u', 'u.uid = r.uid', 'LEFT')
|
|
2074
|
|
- ->field('r.operation_id, r.uid, u.nickname, u.account, r.old_level_id, r.new_level_id, r.mark, r.create_time');
|
|
|
2093
|
+ ->join('user u', 'u.uid = r.old_level_id', 'LEFT')
|
|
|
2094
|
+ ->join('user ua', 'ua.uid = r.new_level_id', 'LEFT')
|
|
|
2095
|
+ ->field('r.operation_id, r.uid, u.account as old_account, ua.account as new_account, r.mark, r.create_time');
|
|
2075
|
2096
|
if($uid){
|
|
2076
|
2097
|
$records->where('r.uid', $uid);
|
|
2077
|
2098
|
}
|