LiuJ 1 сар өмнө
parent
commit
2e4c020a92

+ 13 - 10
app/JsonRpc/NewsService.php

@@ -25,6 +25,9 @@ use App\Model\News;
 use App\Model\UserInfo;
 use App\Model\WebsiteGroup;;
 
+use App\Model\Glawn;
+use App\Model\Gonglue;
+
 
 use App\Model\JobResume;
 
@@ -10364,7 +10367,7 @@ class NewsService implements NewsServiceInterface
         return Result::success($result);
     }
 
-  // 政讯--官网--法律咨询 LegalConsult
+  // 政讯--官网--法律咨询 Glaw
     /**
      * 法律咨询-获取官网法律咨询列表
      * @param array $data
@@ -10382,7 +10385,7 @@ class NewsService implements NewsServiceInterface
             $where['glaw.status'] = $data['status'];
         }
 
-        $result = LegalConsult::when($data['is_master'] == 0, function ($query) {
+        $result = Glaw::when($data['is_master'] == 0, function ($query) {
             $query->whereIn('glaw.status', [0, 2]);
         })
             ->when(!empty($where), function ($query) use ($where) {
@@ -10412,14 +10415,14 @@ class NewsService implements NewsServiceInterface
         if (empty($user)) {
             return Result::error('用户不存在!');
         }
-        $glaw = LegalConsult::where('id', $data['id'])->first();
+        $glaw = Glaw::where('id', $data['id'])->first();
         if (empty($glaw)) {
             return Result::error('此法律咨询不存在');
         }
         $id = $data['id'];
         unset($data['id']);
         unset($data['user_id']);
-        $result = LegalConsult::where('id', $id)->update($data);
+        $result = Glaw::where('id', $id)->update($data);
         if (empty($result)) {
             return Result::error('修改法律咨询状态失败!');
         }
@@ -10436,7 +10439,7 @@ class NewsService implements NewsServiceInterface
         if (empty($user)) {
             return Result::error('用户不存在!');
         }
-        $glaw = LegalConsult::where('id', $data['id'])->first();
+        $glaw = Glaw::where('id', $data['id'])->first();
         if (empty($glaw)) {
             return Result::error('此法律咨询不存在');
         }
@@ -10452,7 +10455,7 @@ class NewsService implements NewsServiceInterface
         if (empty($user)) {
             return Result::error('用户不存在!');
         }
-        $glaw = LegalConsult::where('id', $data['id'])->first();
+        $glaw = Glaw::where('id', $data['id'])->first();
         if (empty($glaw)) {
             return Result::error('此法律咨询不存在');
         }
@@ -10469,7 +10472,7 @@ class NewsService implements NewsServiceInterface
         if (empty($user)) {
             return Result::error('用户不存在!');
         }
-        $result = LegalConsult::create($data);
+        $result = Glaw::create($data);
         if (empty($result)) {
             return Result::error('添加法律咨询失败!');
         }
@@ -10484,14 +10487,14 @@ class NewsService implements NewsServiceInterface
         if (empty($user)) {
             return Result::error('用户不存在!');
         }
-        $glaw = LegalConsult::where('id', $data['id'])->first();
+        $glaw = Glaw::where('id', $data['id'])->first();
         if (empty($glaw)) {
             return Result::error('此法律咨询不存在');
         }
         $id = $data['id'];
         unset($data['id']);
         unset($data['user_id']);
-        $result = LegalConsult::where('id', $id)->update($data);
+        $result = Glaw::where('id', $id)->update($data);
         if (empty($result)) {
             return Result::error('编辑法律咨询失败!');
         }
@@ -10502,7 +10505,7 @@ class NewsService implements NewsServiceInterface
      */
     public function checkLaw(array $data): array
     {
-        $glaw = LegalConsult::where('id', $data['id'])->first();
+        $glaw = Glaw::where('id', $data['id'])->first();
         if (empty($glaw)) {
             return Result::error('此法律咨询不存在');
         }

+ 29 - 0
app/Model/Glaw.php

@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class Glaw extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'glaw';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    // protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+
+    protected array $guarded = [];
+}

+ 29 - 0
app/Model/Gonline.php

@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class Gonline extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'gonline';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    // protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+
+    protected array $guarded = [];
+}