|
|
@@ -19,6 +19,7 @@ import { Configuration } from '../configuration';
|
|
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
|
import { AddOrgInput } from '../models';
|
|
|
import { AdminResultInt64 } from '../models';
|
|
|
+import { AdminResultListOrgTreeOutput } from '../models';
|
|
|
import { AdminResultListSysOrg } from '../models';
|
|
|
import { DeleteOrgInput } from '../models';
|
|
|
import { UpdateOrgInput } from '../models';
|
|
|
@@ -196,6 +197,78 @@ export const SysOrgApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
options: localVarRequestOptions,
|
|
|
};
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 获取机构树 🔖
|
|
|
+ * @param {number} id 主键Id
|
|
|
+ * @param {string} [name] 名称
|
|
|
+ * @param {string} [code] 编码
|
|
|
+ * @param {string} [type] 机构类型
|
|
|
+ * @param {number} [tenantId] 租户Id
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ */
|
|
|
+ apiSysOrgTreeGet: async (id: number, name?: string, code?: string, type?: string, tenantId?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
|
+ // verify required parameter 'id' is not null or undefined
|
|
|
+ if (id === null || id === undefined) {
|
|
|
+ throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysOrgTreeGet.');
|
|
|
+ }
|
|
|
+ const localVarPath = `/api/sysOrg/tree`;
|
|
|
+ // 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;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (name !== undefined) {
|
|
|
+ localVarQueryParameter['Name'] = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (code !== undefined) {
|
|
|
+ localVarQueryParameter['Code'] = code;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (type !== undefined) {
|
|
|
+ localVarQueryParameter['Type'] = type;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (tenantId !== undefined) {
|
|
|
+ localVarQueryParameter['TenantId'] = tenantId;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (id !== undefined) {
|
|
|
+ localVarQueryParameter['Id'] = id;
|
|
|
+ }
|
|
|
+
|
|
|
+ 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 更新机构 🔖
|
|
|
@@ -299,6 +372,24 @@ export const SysOrgApiFp = function(configuration?: Configuration) {
|
|
|
return axios.request(axiosRequestArgs);
|
|
|
};
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 获取机构树 🔖
|
|
|
+ * @param {number} id 主键Id
|
|
|
+ * @param {string} [name] 名称
|
|
|
+ * @param {string} [code] 编码
|
|
|
+ * @param {string} [type] 机构类型
|
|
|
+ * @param {number} [tenantId] 租户Id
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ */
|
|
|
+ async apiSysOrgTreeGet(id: number, name?: string, code?: string, type?: string, tenantId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListOrgTreeOutput>>> {
|
|
|
+ const localVarAxiosArgs = await SysOrgApiAxiosParamCreator(configuration).apiSysOrgTreeGet(id, name, code, type, tenantId, options);
|
|
|
+ return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
|
+ const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
|
+ return axios.request(axiosRequestArgs);
|
|
|
+ };
|
|
|
+ },
|
|
|
/**
|
|
|
*
|
|
|
* @summary 更新机构 🔖
|
|
|
@@ -356,6 +447,20 @@ export const SysOrgApiFactory = function (configuration?: Configuration, basePat
|
|
|
async apiSysOrgListGet(id: number, name?: string, code?: string, type?: string, tenantId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysOrg>> {
|
|
|
return SysOrgApiFp(configuration).apiSysOrgListGet(id, name, code, type, tenantId, options).then((request) => request(axios, basePath));
|
|
|
},
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 获取机构树 🔖
|
|
|
+ * @param {number} id 主键Id
|
|
|
+ * @param {string} [name] 名称
|
|
|
+ * @param {string} [code] 编码
|
|
|
+ * @param {string} [type] 机构类型
|
|
|
+ * @param {number} [tenantId] 租户Id
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ */
|
|
|
+ async apiSysOrgTreeGet(id: number, name?: string, code?: string, type?: string, tenantId?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListOrgTreeOutput>> {
|
|
|
+ return SysOrgApiFp(configuration).apiSysOrgTreeGet(id, name, code, type, tenantId, options).then((request) => request(axios, basePath));
|
|
|
+ },
|
|
|
/**
|
|
|
*
|
|
|
* @summary 更新机构 🔖
|
|
|
@@ -413,6 +518,21 @@ export class SysOrgApi extends BaseAPI {
|
|
|
public async apiSysOrgListGet(id: number, name?: string, code?: string, type?: string, tenantId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysOrg>> {
|
|
|
return SysOrgApiFp(this.configuration).apiSysOrgListGet(id, name, code, type, tenantId, options).then((request) => request(this.axios, this.basePath));
|
|
|
}
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @summary 获取机构树 🔖
|
|
|
+ * @param {number} id 主键Id
|
|
|
+ * @param {string} [name] 名称
|
|
|
+ * @param {string} [code] 编码
|
|
|
+ * @param {string} [type] 机构类型
|
|
|
+ * @param {number} [tenantId] 租户Id
|
|
|
+ * @param {*} [options] Override http request option.
|
|
|
+ * @throws {RequiredError}
|
|
|
+ * @memberof SysOrgApi
|
|
|
+ */
|
|
|
+ public async apiSysOrgTreeGet(id: number, name?: string, code?: string, type?: string, tenantId?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListOrgTreeOutput>> {
|
|
|
+ return SysOrgApiFp(this.configuration).apiSysOrgTreeGet(id, name, code, type, tenantId, options).then((request) => request(this.axios, this.basePath));
|
|
|
+ }
|
|
|
/**
|
|
|
*
|
|
|
* @summary 更新机构 🔖
|