Browse Source

小高薪

cqp 3 months ago
parent
commit
7e346581fb
1 changed files with 6 additions and 6 deletions
  1. 6 6
      app/Service/EmployeeService.php

+ 6 - 6
app/Service/EmployeeService.php

@@ -62,10 +62,10 @@ class EmployeeService extends Service
             $model->title = $data['title'];
             $model->mobile = $data['mobile'];
             $model->sex = $data['sex'];
-            $model->education = $data['education'];
+            $model->education = $data['education'] ?? "";
             $model->id_card = $data['id_card'];
-            $model->major = $data['major'];
-            $model->p_title = $data['p_title'];
+            $model->major = $data['major'] ?? "";
+            $model->p_title = $data['p_title'] ?? "";
             $model->state = $data['state'];
             $model->is_admin = $data['is_admin'];
             if($model->is_admin && $data['password'] !== '******') {
@@ -123,10 +123,10 @@ class EmployeeService extends Service
             $model->title = $data['title'];
             $model->mobile = $data['mobile'];
             $model->sex = $data['sex'];
-            $model->education = $data['education'];
+            $model->education = $data['education'] ?? "";
             $model->id_card = $data['id_card'];
-            $model->major = $data['major'];
-            $model->p_title = $data['p_title'];
+            $model->major = $data['major'] ?? "";
+            $model->p_title = $data['p_title'] ?? "";
             $model->state = $data['state'];
             $model->crt_id = $user['id'];
             $model->is_admin = $data['is_admin'];