😎调整系统参数配置接口
This commit is contained in:
parent
b9480e34db
commit
1b3c495426
@ -137,11 +137,22 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据Code获取参数配置值
|
/// 根据Code获取参数配置值 🔖
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="code"></param>
|
/// <param name="code"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[DisplayName("根据Code获取参数配置值")]
|
[DisplayName("根据Code获取参数配置值")]
|
||||||
|
public async Task<string> GetConfigValueByCode(string code)
|
||||||
|
{
|
||||||
|
return await GetConfigValueByCode<string>(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取参数配置值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonAction]
|
||||||
public async Task<T> GetConfigValueByCode<T>(string code)
|
public async Task<T> GetConfigValueByCode<T>(string code)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(code)) return default;
|
if (string.IsNullOrWhiteSpace(code)) return default;
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import { AdminResultListString } from '../models';
|
|||||||
import { AdminResultListSysConfig } from '../models';
|
import { AdminResultListSysConfig } from '../models';
|
||||||
import { AdminResultObject } from '../models';
|
import { AdminResultObject } from '../models';
|
||||||
import { AdminResultSqlSugarPagedListSysConfig } from '../models';
|
import { AdminResultSqlSugarPagedListSysConfig } from '../models';
|
||||||
|
import { AdminResultString } from '../models';
|
||||||
import { AdminResultSysConfig } from '../models';
|
import { AdminResultSysConfig } from '../models';
|
||||||
import { BatchConfigInput } from '../models';
|
import { BatchConfigInput } from '../models';
|
||||||
import { DeleteConfigInput } from '../models';
|
import { DeleteConfigInput } from '../models';
|
||||||
@ -178,6 +179,55 @@ export const SysConfigApiAxiosParamCreator = function (configuration?: Configura
|
|||||||
options: localVarRequestOptions,
|
options: localVarRequestOptions,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 根据Code获取参数配置值 🔖
|
||||||
|
* @param {string} code
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysConfigConfigValueByCodeCodeGet: async (code: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'code' is not null or undefined
|
||||||
|
if (code === null || code === undefined) {
|
||||||
|
throw new RequiredError('code','Required parameter code was null or undefined when calling apiSysConfigConfigValueByCodeCodeGet.');
|
||||||
|
}
|
||||||
|
const localVarPath = `/api/sysConfig/configValueByCode/{code}`
|
||||||
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication Bearer required
|
||||||
|
// http bearer authentication required
|
||||||
|
if (configuration && configuration.accessToken) {
|
||||||
|
const accessToken = typeof configuration.accessToken === 'function'
|
||||||
|
? await configuration.accessToken()
|
||||||
|
: await configuration.accessToken;
|
||||||
|
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 删除参数配置 🔖
|
* @summary 删除参数配置 🔖
|
||||||
@ -607,6 +657,20 @@ export const SysConfigApiFp = function(configuration?: Configuration) {
|
|||||||
return axios.request(axiosRequestArgs);
|
return axios.request(axiosRequestArgs);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 根据Code获取参数配置值 🔖
|
||||||
|
* @param {string} code
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysConfigConfigValueByCodeCodeGet(code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultString>>> {
|
||||||
|
const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigConfigValueByCodeCodeGet(code, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 删除参数配置 🔖
|
* @summary 删除参数配置 🔖
|
||||||
@ -756,6 +820,16 @@ export const SysConfigApiFactory = function (configuration?: Configuration, base
|
|||||||
async apiSysConfigBatchUpdatePost(body?: Array<BatchConfigInput>, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
async apiSysConfigBatchUpdatePost(body?: Array<BatchConfigInput>, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||||
return SysConfigApiFp(configuration).apiSysConfigBatchUpdatePost(body, options).then((request) => request(axios, basePath));
|
return SysConfigApiFp(configuration).apiSysConfigBatchUpdatePost(body, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 根据Code获取参数配置值 🔖
|
||||||
|
* @param {string} code
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysConfigConfigValueByCodeCodeGet(code: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultString>> {
|
||||||
|
return SysConfigApiFp(configuration).apiSysConfigConfigValueByCodeCodeGet(code, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 删除参数配置 🔖
|
* @summary 删除参数配置 🔖
|
||||||
@ -877,6 +951,17 @@ export class SysConfigApi extends BaseAPI {
|
|||||||
public async apiSysConfigBatchUpdatePost(body?: Array<BatchConfigInput>, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
public async apiSysConfigBatchUpdatePost(body?: Array<BatchConfigInput>, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||||
return SysConfigApiFp(this.configuration).apiSysConfigBatchUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
|
return SysConfigApiFp(this.configuration).apiSysConfigBatchUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 根据Code获取参数配置值 🔖
|
||||||
|
* @param {string} code
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysConfigApi
|
||||||
|
*/
|
||||||
|
public async apiSysConfigConfigValueByCodeCodeGet(code: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultString>> {
|
||||||
|
return SysConfigApiFp(this.configuration).apiSysConfigConfigValueByCodeCodeGet(code, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 删除参数配置 🔖
|
* @summary 删除参数配置 🔖
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user