15313670163 1 місяць тому
батько
коміт
013b697563
1 змінених файлів з 7 додано та 7 видалено
  1. 7 7
      app/JsonRpc/NewsService.php

+ 7 - 7
app/JsonRpc/NewsService.php

@@ -1371,7 +1371,7 @@ class NewsService implements NewsServiceInterface
         }
         $user = User::where('id', $data['user_id'])->first();
         // return Result::success($user);
-        if(empty($user)){
+        if(empty($user) || $user['type_id']!= $data['user_type']){
             return Result::error("用户不存在", 0);
         }
         if($user['type_id']==3 && $job['user_id']!= $user['id']){
@@ -1424,14 +1424,14 @@ class NewsService implements NewsServiceInterface
                         Db::rollback();
                         return Result::error("网站不存在");
                     }
-                    $company['job_id'] = $jobId;
+                    $company['job_id'] = $data['id'];
                     $company['website_id'] = $data['website_id'];
+                    
                     $companyData = $this->upJobCompany($company);
-                    return $companyData;
-                    // if (empty($companyData)) {
-                    //     Db::rollback();
-                    //     return Result::error("修改失败");
-                    // }
+                    if (empty($companyData)) {
+                        Db::rollback();
+                        return Result::error("修改失败");
+                    }
                 }
                 $data['website_id'] = $user['website_id'];
                 Db::commit();