|
|
@@ -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('此法律咨询不存在');
|
|
|
}
|