feat: 开发中...

This commit is contained in:
2023-04-01 19:17:20 +08:00
parent 81288078d4
commit d1054590cd
17 changed files with 293 additions and 82 deletions

View File

@@ -20,6 +20,7 @@ import { ResponseVOPageableVOSettingInfoResponseVO } from '../models';
import { ResponseVOSettingInfoResponseVO } from '../models';
import { ResponseVOString } from '../models';
import { ResponseVOVoid } from '../models';
import { SettingUpdateRequireVO } from '../models';
/**
* SettingControllerApi - axios parameter creator
* @export
@@ -201,12 +202,12 @@ export const SettingControllerApiAxiosParamCreator = function (configuration?: C
/**
*
* @summary 更改网站设置
* @param {string} body
* @param {SettingUpdateRequireVO} body
* @param {string} id 设置ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateSetting: async (body: string, id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
updateSetting: async (body: SettingUpdateRequireVO, id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body','Required parameter body was null or undefined when calling updateSetting.');
@@ -227,7 +228,50 @@ export const SettingControllerApiAxiosParamCreator = function (configuration?: C
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'text/plain';
localVarHeaderParameter['Content-Type'] = 'application/json';
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};
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
},
/**
*
* @summary 批量更改网站设置
* @param {{ [key: string]: string; }} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateSettings: async (body: { [key: string]: string; }, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError('body','Required parameter body was null or undefined when calling updateSettings.');
}
const localVarPath = `/api/v1/settings/`;
// 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: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
@@ -316,18 +360,32 @@ export const SettingControllerApiFp = function(configuration?: Configuration) {
/**
*
* @summary 更改网站设置
* @param {string} body
* @param {SettingUpdateRequireVO} body
* @param {string} id 设置ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateSetting(body: string, id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
async updateSetting(body: SettingUpdateRequireVO, id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
const localVarAxiosArgs = await SettingControllerApiAxiosParamCreator(configuration).updateSetting(body, id, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
/**
*
* @summary 批量更改网站设置
* @param {{ [key: string]: string; }} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateSettings(body: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
const localVarAxiosArgs = await SettingControllerApiAxiosParamCreator(configuration).updateSettings(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs);
};
},
}
};
@@ -381,14 +439,24 @@ export const SettingControllerApiFactory = function (configuration?: Configurati
/**
*
* @summary 更改网站设置
* @param {string} body
* @param {SettingUpdateRequireVO} body
* @param {string} id 设置ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateSetting(body: string, id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
async updateSetting(body: SettingUpdateRequireVO, id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
return SettingControllerApiFp(configuration).updateSetting(body, id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary 批量更改网站设置
* @param {{ [key: string]: string; }} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateSettings(body: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
return SettingControllerApiFp(configuration).updateSettings(body, options).then((request) => request(axios, basePath));
},
};
};
@@ -447,13 +515,24 @@ export class SettingControllerApi extends BaseAPI {
/**
*
* @summary 更改网站设置
* @param {string} body
* @param {SettingUpdateRequireVO} body
* @param {string} id 设置ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SettingControllerApi
*/
public async updateSetting(body: string, id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
public async updateSetting(body: SettingUpdateRequireVO, id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
return SettingControllerApiFp(this.configuration).updateSetting(body, id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary 批量更改网站设置
* @param {{ [key: string]: string; }} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SettingControllerApi
*/
public async updateSettings(body: { [key: string]: string; }, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
return SettingControllerApiFp(this.configuration).updateSettings(body, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@@ -21,6 +21,7 @@ export * from './response-vostring';
export * from './response-vouser-info-response-vo';
export * from './response-vovoid';
export * from './setting-info-response-vo';
export * from './setting-update-require-vo';
export * from './user-create-require-vo';
export * from './user-entity';
export * from './user-info-response-vo';

View File

@@ -0,0 +1,26 @@
/* tslint:disable */
/* eslint-disable */
/**
* OpenAPI definition
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/**
* 设置内容
* @export
* @interface SettingUpdateRequireVO
*/
export interface SettingUpdateRequireVO {
/**
*
* @type {string}
* @memberof SettingUpdateRequireVO
*/
content?: string;
}