From 9f70a1ee5cdffaef3a96e4042c8eea251df2fa0d Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 06 八月 2025 17:21:56 +0800
Subject: [PATCH] feat: 字典
---
src/services/api/dictionary.ts | 127 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 123 insertions(+), 4 deletions(-)
diff --git a/src/services/api/dictionary.ts b/src/services/api/dictionary.ts
index 3d209df..22cee24 100644
--- a/src/services/api/dictionary.ts
+++ b/src/services/api/dictionary.ts
@@ -2,13 +2,132 @@
// @ts-ignore
import { request } from '@/utils/request';
-/** 鑾峰彇瀛楀吀鏁版嵁鍒嗛〉鍒楄〃 GET /api/main/dictionary/getDictionaryDatas */
-export async function dictionaryGetDictionaryDatas(
+/** 鍒犻櫎鏁版嵁瀛楀吀绫诲埆 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
) {
- return request<API.GetDictionaryDatasQueryResult>('/api/main/dictionary/getDictionaryDatas', {
- method: 'GET',
+ return request<API.PagedListQueryResultGetDictionaryDatasQueryResultItem>(
+ '/api/main/dictionary/getDictionaryDatas',
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json-patch+json',
+ },
+ data: body,
+ ...(options || {}),
+ }
+ );
+}
+
+/** 鏌ヨ鏁版嵁瀛楀吀閫夋嫨鍣� 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',
},
--
Gitblit v1.9.1