|
@@ -1661,4 +1661,23 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改网站栏目排序
|
|
|
+ * @param array $data
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function upWebsiteCategorySort(array $data): array
|
|
|
+ {
|
|
|
+ $where = [
|
|
|
+ 'website_id' => $data['website_id'],
|
|
|
+ 'id' => $data['id'],
|
|
|
+ ];
|
|
|
+ $result = WebsiteCategory::where($where)->update($data);
|
|
|
+ if ($result) {
|
|
|
+ return Result::success($result);
|
|
|
+ } else {
|
|
|
+ return Result::error("更新失败", 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|