|
@@ -41,6 +41,7 @@ use App\Tools\PublicData;
|
|
use App\Model\ChatGroups;
|
|
use App\Model\ChatGroups;
|
|
use App\Model\ChatGroupsMember;
|
|
use App\Model\ChatGroupsMember;
|
|
use App\Model\ChatRecords;
|
|
use App\Model\ChatRecords;
|
|
|
|
+use App\Model\Complaint;
|
|
|
|
|
|
#[RpcService(name: "NewsService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
|
|
#[RpcService(name: "NewsService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
|
|
class NewsService implements NewsServiceInterface
|
|
class NewsService implements NewsServiceInterface
|
|
@@ -1735,6 +1736,16 @@ class NewsService implements NewsServiceInterface
|
|
'good.name' => $data['name'],
|
|
'good.name' => $data['name'],
|
|
];
|
|
];
|
|
}
|
|
}
|
|
|
|
+ //status
|
|
|
|
+ if (isset($data['status']) && $data['status'] != '') {
|
|
|
|
+ $where = [
|
|
|
|
+ 'good.status' => $data['status'],
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ //status1
|
|
|
|
+ // if (isset($data['status1']) && $data['status1'] == 1) {
|
|
|
|
+ // $status1 = 1;
|
|
|
|
+ // }
|
|
$where1 = [];
|
|
$where1 = [];
|
|
//website_id
|
|
//website_id
|
|
// if (isset($data['website_id']) && $data['website_id']) {
|
|
// if (isset($data['website_id']) && $data['website_id']) {
|
|
@@ -1758,6 +1769,10 @@ class NewsService implements NewsServiceInterface
|
|
->when(!empty($where1), function ($query) use ($where1) {
|
|
->when(!empty($where1), function ($query) use ($where1) {
|
|
return $query->where($where1);
|
|
return $query->where($where1);
|
|
})
|
|
})
|
|
|
|
+ //status 1待审核2已审核3已拒绝
|
|
|
|
+ ->when(isset($data['status1']), function ($query) {
|
|
|
|
+ return $query->whereIn('good.status', [1, 3]);
|
|
|
|
+ })
|
|
->leftJoin('district', 'good.city_id', '=', 'district.id')
|
|
->leftJoin('district', 'good.city_id', '=', 'district.id')
|
|
->leftJoin('website', 'good.website_id', '=', 'website.id')
|
|
->leftJoin('website', 'good.website_id', '=', 'website.id')
|
|
->leftJoin('category', 'good.catid', '=', 'category.id')
|
|
->leftJoin('category', 'good.catid', '=', 'category.id')
|
|
@@ -2267,6 +2282,26 @@ class NewsService implements NewsServiceInterface
|
|
}
|
|
}
|
|
return Result::success($result);
|
|
return Result::success($result);
|
|
}
|
|
}
|
|
|
|
+ public function updateComplaintStatus(array $data): array
|
|
|
|
+ {
|
|
|
|
+ $result = complaint::where('id', $data['id'])->update($data);
|
|
|
|
+ return Result::success($result);
|
|
|
|
+ }
|
|
|
|
+ public function updateGoodStatus(array $data): array
|
|
|
|
+ {
|
|
|
|
+ $result = Good::where('id', $data['id'])->update($data);
|
|
|
|
+ return Result::success($result);
|
|
|
|
+ }
|
|
|
|
+ public function updateJobHuntingStatus(array $data): array
|
|
|
|
+ {
|
|
|
|
+ $result = JobHunting::where('id', $data['id'])->update($data);
|
|
|
|
+ return Result::success($result);
|
|
|
|
+ }
|
|
|
|
+ public function updateNoticeStatus(array $data): array
|
|
|
|
+ {
|
|
|
|
+ $result = Notice::where('id', $data['id'])->update($data);
|
|
|
|
+ return Result::success($result);
|
|
|
|
+ }
|
|
|
|
|
|
//20250324 通知,公告,消息
|
|
//20250324 通知,公告,消息
|
|
|
|
|