Просмотр исходного кода

后台-推荐人/节点人/身份修改-修复错误

xupuyuan месяцев назад: 11
Родитель
Сommit
42abd4677a
1 измененных файлов с 15 добавлено и 10 удалено
  1. 15 10
      app/controller/admin/user/User.php

+ 15 - 10
app/controller/admin/user/User.php

@@ -815,11 +815,13 @@ class User extends BaseController
815
     {
815
     {
816
         $spread_account = $this->request->param('spread_account');
816
         $spread_account = $this->request->param('spread_account');
817
         $adminId = $this->request->adminId();
817
         $adminId = $this->request->adminId();
818
+        $adminInfo = $this->request->adminInfo();
819
+        $operation = $adminInfo['account'].'修改用户推荐人';
818
         $mark = $this->request->param('mark');
820
         $mark = $this->request->param('mark');
819
-        if (empty($mark)) {
820
-            $adminInfo = $this->request->adminInfo();
821
-            $mark = $adminInfo['account'].'修改用户推荐人';
821
+        if (!empty($mark)) {
822
+            $mark = "($mark)";
822
         }
823
         }
824
+        $mark = $operation.$mark;
823
         $olld_id = Db::name('user')->where('uid', $id)->value('spread_uid')??0;
825
         $olld_id = Db::name('user')->where('uid', $id)->value('spread_uid')??0;
824
         if($repository->update_spread($id,$spread_account,$mark,$olld_id,$adminId)){
826
         if($repository->update_spread($id,$spread_account,$mark,$olld_id,$adminId)){
825
             return app('json')->success("修改成功");
827
             return app('json')->success("修改成功");
@@ -855,11 +857,13 @@ class User extends BaseController
855
         $level_account = $this->request->param('level_account');
857
         $level_account = $this->request->param('level_account');
856
         $olld_id = Db::name('user')->where('uid', $id)->value('level_id')??0;
858
         $olld_id = Db::name('user')->where('uid', $id)->value('level_id')??0;
857
         $adminId = $this->request->adminId();
859
         $adminId = $this->request->adminId();
860
+        $adminInfo = $this->request->adminInfo();
861
+        $operation = $adminInfo['account'].'修改用户节点人';
858
         $mark = $this->request->param('mark');
862
         $mark = $this->request->param('mark');
859
-        if (empty($mark)) {
860
-            $adminInfo = $this->request->adminInfo();
861
-            $mark = $adminInfo['account'].'修改用户节点人';
863
+        if (!empty($mark)) {
864
+            $mark = "($mark)";
862
         }
865
         }
866
+        $mark = $operation.$mark;
863
         if (!$id) {
867
         if (!$id) {
864
             return app('json')->fail("参数丢失");
868
             return app('json')->fail("参数丢失");
865
         }
869
         }
@@ -881,15 +885,16 @@ class User extends BaseController
881
     }
885
     }
882
     public function changeProGroup($id,UserRepository $repository)
886
     public function changeProGroup($id,UserRepository $repository)
883
     {
887
     {
884
-        $adminId = $this->request->adminId();
885
         $old_identity_id = $this->request->param('old_identity_id');
888
         $old_identity_id = $this->request->param('old_identity_id');
886
         $new_identity_id = $this->request->param('new_identity_id');
889
         $new_identity_id = $this->request->param('new_identity_id');
887
         $adminId = $this->request->adminId();
890
         $adminId = $this->request->adminId();
891
+        $adminInfo = $this->request->adminInfo();
892
+        $operation = $adminInfo['account'].'修改用户身份';
888
         $mark = $this->request->param('mark');
893
         $mark = $this->request->param('mark');
889
-        if (empty($mark)) {
890
-            $adminInfo = $this->request->adminInfo();
891
-            $mark = $adminInfo['account'].'修改用户身份';
894
+        if (!empty($mark)) {
895
+            $mark = "($mark)";
892
         }
896
         }
897
+        $mark = $operation.$mark;
893
         if (empty($id) || empty($old_identity_id) || empty($new_identity_id)) {
898
         if (empty($id) || empty($old_identity_id) || empty($new_identity_id)) {
894
             return app('json')->fail("参数丢失");
899
             return app('json')->fail("参数丢失");
895
         }
900
         }