From 03ffdd67fc4c40f3e9443931a0aa55e508182873 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 06 八月 2025 17:00:06 +0800
Subject: [PATCH] feat: 字典

---
 src/services/api/dictionary.ts |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 117 insertions(+), 1 deletions(-)

diff --git a/src/services/api/dictionary.ts b/src/services/api/dictionary.ts
index 961750b..22cee24 100644
--- a/src/services/api/dictionary.ts
+++ b/src/services/api/dictionary.ts
@@ -2,7 +2,60 @@
 // @ts-ignore
 import { request } from '@/utils/request';
 
-/** 鑾峰彇瀛楀吀鏁版嵁鍒嗛〉鍒楄〃 POST /api/main/dictionary/getDictionaryDatas */
+/** 鍒犻櫎鏁版嵁瀛楀吀绫诲埆 DELETE /api/main/dictionary/deleteDictionaryCategory */
+export async function deleteDictionaryCategory(
+  body: API.DeleteDictionaryCategoryCommand,
+  options?: API.RequestConfig
+) {
+  return request<number>('/api/main/dictionary/deleteDictionaryCategory', {
+    method: 'DELETE',
+    headers: {
+      'Content-Type': 'application/json-patch+json',
+    },
+    data: body,
+    ...(options || {}),
+  });
+}
+
+/** 鑾峰彇鏁版嵁瀛楀吀绫诲埆鍒嗛〉鍒楄〃鏁版嵁 POST /api/main/dictionary/getDictionaryCategories */
+export async function getDictionaryCategories(
+  body: API.GetDictionaryCategoriesQuery,
+  options?: API.RequestConfig
+) {
+  return request<API.PagedListQueryResultGetDictionaryCategoriesQueryResultItem>(
+    '/api/main/dictionary/getDictionaryCategories',
+    {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json-patch+json',
+      },
+      data: body,
+      ...(options || {}),
+    }
+  );
+}
+
+/** 鏌ヨ鏁版嵁瀛楀吀绫诲埆閫夋嫨鍣ㄦ暟鎹� GET /api/main/dictionary/getDictionaryCategorySelect */
+export async function getDictionaryCategorySelect(
+  // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+  params: API.APIgetDictionaryCategorySelectParams,
+  options?: API.RequestConfig
+) {
+  return request<API.SelectQueryResultOptionGuidGetDictionaryCategorySelectQueryOption[]>(
+    '/api/main/dictionary/getDictionaryCategorySelect',
+    {
+      method: 'GET',
+      params: {
+        ...params,
+        request: undefined,
+        ...params['request'],
+      },
+      ...(options || {}),
+    }
+  );
+}
+
+/** 鑾峰彇鏁版嵁瀛楀吀鍒嗛〉鍒楄〃鏁版嵁 POST /api/main/dictionary/getDictionaryDatas */
 export async function getDictionaryDatas(
   body: API.GetDictionaryDatasQuery,
   options?: API.RequestConfig
@@ -19,3 +72,66 @@
     }
   );
 }
+
+/** 鏌ヨ鏁版嵁瀛楀吀閫夋嫨鍣� GET /api/main/dictionary/getDictionaryDataSelect */
+export async function getDictionaryDataSelect(
+  // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+  params: API.APIgetDictionaryDataSelectParams,
+  options?: API.RequestConfig
+) {
+  return request<API.SelectQueryResultOptionGuidGetDictionaryDataSelectQueryResultOption[]>(
+    '/api/main/dictionary/getDictionaryDataSelect',
+    {
+      method: 'GET',
+      params: {
+        ...params,
+      },
+      ...(options || {}),
+    }
+  );
+}
+
+/** 淇濆瓨鏁版嵁瀛楀吀绫诲埆 POST /api/main/dictionary/saveDictionaryCategory */
+export async function saveDictionaryCategory(
+  body: API.SaveDictionaryCategoryCommand,
+  options?: API.RequestConfig
+) {
+  return request<string>('/api/main/dictionary/saveDictionaryCategory', {
+    method: 'POST',
+    headers: {
+      'Content-Type': 'application/json-patch+json',
+    },
+    data: body,
+    ...(options || {}),
+  });
+}
+
+/** 淇濆瓨鏁版嵁瀛楀吀 POST /api/main/dictionary/saveDictionaryData */
+export async function saveDictionaryData(
+  body: API.SaveDictionaryDataCommand,
+  options?: API.RequestConfig
+) {
+  return request<string>('/api/main/dictionary/saveDictionaryData', {
+    method: 'POST',
+    headers: {
+      'Content-Type': 'application/json-patch+json',
+    },
+    data: body,
+    ...(options || {}),
+  });
+}
+
+/** 璁剧疆鏁版嵁瀛楀吀鏄惁绂佺敤 PUT /api/main/dictionary/setDictionaryDataIsDisabled */
+export async function setDictionaryDataIsDisabled(
+  body: API.SetDictionaryDataIsDisabledCommand,
+  options?: API.RequestConfig
+) {
+  return request<number>('/api/main/dictionary/setDictionaryDataIsDisabled', {
+    method: 'PUT',
+    headers: {
+      'Content-Type': 'application/json-patch+json',
+    },
+    data: body,
+    ...(options || {}),
+  });
+}

--
Gitblit v1.9.1