|
@@ -2993,4 +2993,19 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新网站状态
|
|
|
+ * @param array $data
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function updateWebsiteStatus(array $data): array
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ Website::where(["id"=>$data['id']])->update(["status"=>intval($data['status'])]);
|
|
|
+ return Result::success([]);
|
|
|
+ }catch (\Exception $e){
|
|
|
+ return Result::error($e->getMessage(), 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|