wesmiler 2 months ago
parent
commit
f6f8d8a52d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/Services/Common/SupervisorsService.php

+ 3 - 3
app/Services/Common/SupervisorsService.php

@@ -210,9 +210,9 @@ class SupervisorsService extends BaseService
             }
         }
 
-        $userId = isset($data['user_id']) ? intval($data['user_id']) : 0;
-        if ($userId) {
-            $checkId = $this->model->where(['user_id' => $userId, 'mark' => 1])->value('id');
+        $data['user_id'] = isset($data['user_id']) ? intval($data['user_id']) : 0;
+        if ($data['user_id']) {
+            $checkId = $this->model->where(['user_id' => $data['user_id'], 'mark' => 1])->value('id');
             if ($checkId && ($id != $checkId)) {
                 return message('该会员账号已绑定其他导师', false);
             }