diff --git a/.env.production b/.env.production index 141fffa..d6a6065 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ NODE_ENV = 'production' VITE_APP_TITLE = '无糖运营平台' -VITE_APP_BASE_API = '/prod-api' \ No newline at end of file +# VITE_APP_BASE_API = '/prod-api' \ No newline at end of file diff --git a/.env_1.production b/.env_1.production index 141fffa..6d6d61c 100644 --- a/.env_1.production +++ b/.env_1.production @@ -1,3 +1,2 @@ NODE_ENV = 'production' -VITE_APP_TITLE = '无糖运营平台' -VITE_APP_BASE_API = '/prod-api' \ No newline at end of file +VITE_APP_TITLE = '无糖运营平台' \ No newline at end of file diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..9d0204a Binary files /dev/null and b/dist.zip differ diff --git a/generated/core/ApiError.ts b/generated/core/ApiError.ts index 1406a44..ec7b16a 100644 --- a/generated/core/ApiError.ts +++ b/generated/core/ApiError.ts @@ -2,28 +2,24 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions' -import type { ApiResult } from './ApiResult' +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string - public readonly status: number - public readonly statusText: string - public readonly body: any - public readonly request: ApiRequestOptions + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: any; + public readonly request: ApiRequestOptions; - constructor( - request: ApiRequestOptions, - response: ApiResult, - message: string, - ) { - super(message) + constructor(request: ApiRequestOptions, response: ApiResult, message: string) { + super(message); - this.name = 'ApiError' - this.url = response.url - this.status = response.status - this.statusText = response.statusText - this.body = response.body - this.request = request - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/generated/core/ApiRequestOptions.ts b/generated/core/ApiRequestOptions.ts index 77d1db4..93143c3 100644 --- a/generated/core/ApiRequestOptions.ts +++ b/generated/core/ApiRequestOptions.ts @@ -3,22 +3,15 @@ /* tslint:disable */ /* eslint-disable */ export type ApiRequestOptions = { - readonly method: - | 'GET' - | 'PUT' - | 'POST' - | 'DELETE' - | 'OPTIONS' - | 'HEAD' - | 'PATCH' - readonly url: string - readonly path?: Record - readonly cookies?: Record - readonly headers?: Record - readonly query?: Record - readonly formData?: Record - readonly body?: any - readonly mediaType?: string - readonly responseHeader?: string - readonly errors?: Record -} + readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; +}; diff --git a/generated/core/ApiResult.ts b/generated/core/ApiResult.ts index 6509a7d..ee1126e 100644 --- a/generated/core/ApiResult.ts +++ b/generated/core/ApiResult.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type ApiResult = { - readonly url: string - readonly ok: boolean - readonly status: number - readonly statusText: string - readonly body: any -} + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; +}; diff --git a/generated/core/CancelablePromise.ts b/generated/core/CancelablePromise.ts index 0cf2f53..d70de92 100644 --- a/generated/core/CancelablePromise.ts +++ b/generated/core/CancelablePromise.ts @@ -3,128 +3,129 @@ /* tslint:disable */ /* eslint-disable */ export class CancelError extends Error { - constructor(message: string) { - super(message) - this.name = 'CancelError' - } - - public get isCancelled(): boolean { - return true - } + + constructor(message: string) { + super(message); + this.name = 'CancelError'; + } + + public get isCancelled(): boolean { + return true; + } } export interface OnCancel { - readonly isResolved: boolean - readonly isRejected: boolean - readonly isCancelled: boolean + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - #isResolved: boolean - #isRejected: boolean - #isCancelled: boolean - readonly #cancelHandlers: (() => void)[] - readonly #promise: Promise - #resolve?: (value: T | PromiseLike) => void - #reject?: (reason?: any) => void - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: any) => void, - onCancel: OnCancel, - ) => void, - ) { - this.#isResolved = false - this.#isRejected = false - this.#isCancelled = false - this.#cancelHandlers = [] - this.#promise = new Promise((resolve, reject) => { - this.#resolve = resolve - this.#reject = reject - - const onResolve = (value: T | PromiseLike): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return - } - this.#isResolved = true - if (this.#resolve) this.#resolve(value) - } + #isResolved: boolean; + #isRejected: boolean; + #isCancelled: boolean; + readonly #cancelHandlers: (() => void)[]; + readonly #promise: Promise; + #resolve?: (value: T | PromiseLike) => void; + #reject?: (reason?: any) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: any) => void, + onCancel: OnCancel + ) => void + ) { + this.#isResolved = false; + this.#isRejected = false; + this.#isCancelled = false; + this.#cancelHandlers = []; + this.#promise = new Promise((resolve, reject) => { + this.#resolve = resolve; + this.#reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isResolved = true; + if (this.#resolve) this.#resolve(value); + }; + + const onReject = (reason?: any): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isRejected = true; + if (this.#reject) this.#reject(reason); + }; + + const onCancel = (cancelHandler: () => void): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#cancelHandlers.push(cancelHandler); + }; + + Object.defineProperty(onCancel, 'isResolved', { + get: (): boolean => this.#isResolved, + }); + + Object.defineProperty(onCancel, 'isRejected', { + get: (): boolean => this.#isRejected, + }); + + Object.defineProperty(onCancel, 'isCancelled', { + get: (): boolean => this.#isCancelled, + }); + + return executor(onResolve, onReject, onCancel as OnCancel); + }); + } - const onReject = (reason?: any): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return - } - this.#isRejected = true - if (this.#reject) this.#reject(reason) - } + get [Symbol.toStringTag]() { + return "Cancellable Promise"; + } + + public then( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: any) => TResult2 | PromiseLike) | null + ): Promise { + return this.#promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: any) => TResult | PromiseLike) | null + ): Promise { + return this.#promise.catch(onRejected); + } - const onCancel = (cancelHandler: () => void): void => { + public finally(onFinally?: (() => void) | null): Promise { + return this.#promise.finally(onFinally); + } + + public cancel(): void { if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return + return; } - this.#cancelHandlers.push(cancelHandler) - } - - Object.defineProperty(onCancel, 'isResolved', { - get: (): boolean => this.#isResolved, - }) - - Object.defineProperty(onCancel, 'isRejected', { - get: (): boolean => this.#isRejected, - }) - - Object.defineProperty(onCancel, 'isCancelled', { - get: (): boolean => this.#isCancelled, - }) - - return executor(onResolve, onReject, onCancel as OnCancel) - }) - } - - get [Symbol.toStringTag]() { - return 'Cancellable Promise' - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: any) => TResult2 | PromiseLike) | null, - ): Promise { - return this.#promise.then(onFulfilled, onRejected) - } - - public catch( - onRejected?: ((reason: any) => TResult | PromiseLike) | null, - ): Promise { - return this.#promise.catch(onRejected) - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.#promise.finally(onFinally) - } - - public cancel(): void { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return - } - this.#isCancelled = true - if (this.#cancelHandlers.length) { - try { - for (const cancelHandler of this.#cancelHandlers) { - cancelHandler() + this.#isCancelled = true; + if (this.#cancelHandlers.length) { + try { + for (const cancelHandler of this.#cancelHandlers) { + cancelHandler(); + } + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } - } catch (error) { - console.warn('Cancellation threw an error', error) - return - } + this.#cancelHandlers.length = 0; + if (this.#reject) this.#reject(new CancelError('Request aborted')); } - this.#cancelHandlers.length = 0 - if (this.#reject) this.#reject(new CancelError('Request aborted')) - } - public get isCancelled(): boolean { - return this.#isCancelled - } + public get isCancelled(): boolean { + return this.#isCancelled; + } } diff --git a/generated/core/OpenAPI.ts b/generated/core/OpenAPI.ts index 5c31ec3..29bec96 100644 --- a/generated/core/OpenAPI.ts +++ b/generated/core/OpenAPI.ts @@ -2,35 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { ApiRequestOptions } from './ApiRequestOptions' -// @ts-expect-error -import { GET_TKOEN } from '@/utils/token' -type Resolver = (options: ApiRequestOptions) => Promise -type Headers = Record +type Resolver = (options: ApiRequestOptions) => Promise; +type Headers = Record; export type OpenAPIConfig = { - BASE: string - VERSION: string - WITH_CREDENTIALS: boolean - CREDENTIALS: 'include' | 'omit' | 'same-origin' - TOKEN?: string | Resolver | undefined - USERNAME?: string | Resolver | undefined - PASSWORD?: string | Resolver | undefined - HEADERS?: Headers | Resolver | undefined - ENCODE_PATH?: ((path: string) => string) | undefined -} + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + HEADERS?: Headers | Resolver | undefined; + ENCODE_PATH?: ((path: string) => string) | undefined; +}; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://39.106.16.162:8080', - VERSION: '1.0.0', - WITH_CREDENTIALS: false, - CREDENTIALS: 'include', - TOKEN: GET_TKOEN('TOKEN') || undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: { - Authorization: 'Bearer ' + GET_TKOEN('TOKEN'), - }, - ENCODE_PATH: undefined, -} + BASE: 'http://39.106.16.162:8080', + VERSION: '1.0.0', + WITH_CREDENTIALS: false, + CREDENTIALS: 'include', + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, + ENCODE_PATH: undefined, +}; diff --git a/generated/core/request.ts b/generated/core/request.ts index d12a121..1dc6fef 100644 --- a/generated/core/request.ts +++ b/generated/core/request.ts @@ -2,315 +2,286 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import axios from 'axios' -import type { - AxiosError, - AxiosRequestConfig, - AxiosResponse, - AxiosInstance, -} from 'axios' -import FormData from 'form-data' - -import { ApiError } from './ApiError' -import type { ApiRequestOptions } from './ApiRequestOptions' -import type { ApiResult } from './ApiResult' -import { CancelablePromise } from './CancelablePromise' -import type { OnCancel } from './CancelablePromise' -import type { OpenAPIConfig } from './OpenAPI' - -export const isDefined = ( - value: T | null | undefined, -): value is Exclude => { - return value !== undefined && value !== null -} +import axios from 'axios'; +import type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios'; +import FormData from 'form-data'; + +import { ApiError } from './ApiError'; +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiResult } from './ApiResult'; +import { CancelablePromise } from './CancelablePromise'; +import type { OnCancel } from './CancelablePromise'; +import type { OpenAPIConfig } from './OpenAPI'; + +export const isDefined = (value: T | null | undefined): value is Exclude => { + return value !== undefined && value !== null; +}; export const isString = (value: any): value is string => { - return typeof value === 'string' -} + return typeof value === 'string'; +}; export const isStringWithValue = (value: any): value is string => { - return isString(value) && value !== '' -} + return isString(value) && value !== ''; +}; export const isBlob = (value: any): value is Blob => { - return ( - typeof value === 'object' && - typeof value.type === 'string' && - typeof value.stream === 'function' && - typeof value.arrayBuffer === 'function' && - typeof value.constructor === 'function' && - typeof value.constructor.name === 'string' && - /^(Blob|File)$/.test(value.constructor.name) && - /^(Blob|File)$/.test(value[Symbol.toStringTag]) - ) -} + return ( + typeof value === 'object' && + typeof value.type === 'string' && + typeof value.stream === 'function' && + typeof value.arrayBuffer === 'function' && + typeof value.constructor === 'function' && + typeof value.constructor.name === 'string' && + /^(Blob|File)$/.test(value.constructor.name) && + /^(Blob|File)$/.test(value[Symbol.toStringTag]) + ); +}; export const isFormData = (value: any): value is FormData => { - return value instanceof FormData -} + return value instanceof FormData; +}; export const isSuccess = (status: number): boolean => { - return status >= 200 && status < 300 -} + return status >= 200 && status < 300; +}; export const base64 = (str: string): string => { - try { - return btoa(str) - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64') - } -} - -export const getQueryString = (params: Record): string => { - const qs: string[] = [] - - const append = (key: string, value: any) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`) - } - - const process = (key: string, value: any) => { - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach((v) => { - process(key, v) - }) - } else if (typeof value === 'object') { - Object.entries(value).forEach(([k, v]) => { - process(`${key}[${k}]`, v) - }) - } else { - append(key, value) - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); } - } +}; - Object.entries(params).forEach(([key, value]) => { - process(key, value) - }) +export const getQueryString = (params: Record): string => { + const qs: string[] = []; - if (qs.length > 0) { - return `?${qs.join('&')}` - } + const append = (key: string, value: any) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - return '' -} + const process = (key: string, value: any) => { + if (isDefined(value)) { + if (Array.isArray(value)) { + value.forEach(v => { + process(key, v); + }); + } else if (typeof value === 'object') { + Object.entries(value).forEach(([k, v]) => { + process(`${key}[${k}]`, v); + }); + } else { + append(key, value); + } + } + }; -const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])) - } - return substring - }) + Object.entries(params).forEach(([key, value]) => { + process(key, value); + }); - const url = `${config.BASE}${path}` - if (options.query) { - return `${url}${getQueryString(options.query)}` - } - return url -} + if (qs.length > 0) { + return `?${qs.join('&')}`; + } -export const getFormData = ( - options: ApiRequestOptions, -): FormData | undefined => { - if (options.formData) { - const formData = new FormData() + return ''; +}; - const process = (key: string, value: any) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value) - } else { - formData.append(key, JSON.stringify(value)) - } +const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = `${config.BASE}${path}`; + if (options.query) { + return `${url}${getQueryString(options.query)}`; + } + return url; +}; + +export const getFormData = (options: ApiRequestOptions): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: any) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; + + Object.entries(options.formData) + .filter(([_, value]) => isDefined(value)) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach(v => process(key, v)); + } else { + process(key, value); + } + }); + + return formData; } + return undefined; +}; - Object.entries(options.formData) - .filter(([_, value]) => isDefined(value)) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((v) => process(key, v)) - } else { - process(key, value) - } - }) - - return formData - } - return undefined -} - -type Resolver = (options: ApiRequestOptions) => Promise - -export const resolve = async ( - options: ApiRequestOptions, - resolver?: T | Resolver, -): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options) - } - return resolver -} - -export const getHeaders = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - formData?: FormData, -): Promise> => { - const [token, username, password, additionalHeaders] = await Promise.all([ - resolve(options, config.TOKEN), - resolve(options, config.USERNAME), - resolve(options, config.PASSWORD), - resolve(options, config.HEADERS), - ]) - - const formHeaders = - (typeof formData?.getHeaders === 'function' && formData?.getHeaders()) || {} - - const headers = Object.entries({ - Accept: 'application/json', - ...additionalHeaders, - ...options.headers, - ...formHeaders, - }) +type Resolver = (options: ApiRequestOptions) => Promise; + +export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; +}; + +export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData): Promise> => { + const [token, username, password, additionalHeaders] = await Promise.all([ + resolve(options, config.TOKEN), + resolve(options, config.USERNAME), + resolve(options, config.PASSWORD), + resolve(options, config.HEADERS), + ]); + + const formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {} + + const headers = Object.entries({ + Accept: 'application/json', + ...additionalHeaders, + ...options.headers, + ...formHeaders, + }) .filter(([_, value]) => isDefined(value)) - .reduce( - (headers, [key, value]) => ({ + .reduce((headers, [key, value]) => ({ ...headers, [key]: String(value), - }), - {} as Record, - ) - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}` - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`) - headers['Authorization'] = `Basic ${credentials}` - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream' - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain' - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json' + }), {} as Record); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; + } } - } - return headers -} + return headers; +}; export const getRequestBody = (options: ApiRequestOptions): any => { - if (options.body) { - return options.body - } - return undefined -} + if (options.body) { + return options.body; + } + return undefined; +}; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Record, - onCancel: OnCancel, - axiosClient: AxiosInstance, + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Record, + onCancel: OnCancel, + axiosClient: AxiosInstance ): Promise> => { - const source = axios.CancelToken.source() - - const requestConfig: AxiosRequestConfig = { - url, - headers, - data: body ?? formData, - method: options.method, - withCredentials: config.WITH_CREDENTIALS, - withXSRFToken: - config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false, - cancelToken: source.token, - } - - onCancel(() => source.cancel('The user aborted a request.')) - - try { - return await axiosClient.request(requestConfig) - } catch (error) { - const axiosError = error as AxiosError - if (axiosError.response) { - return axiosError.response + const source = axios.CancelToken.source(); + + const requestConfig: AxiosRequestConfig = { + url, + headers, + data: body ?? formData, + method: options.method, + withCredentials: config.WITH_CREDENTIALS, + withXSRFToken: config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false, + cancelToken: source.token, + }; + + onCancel(() => source.cancel('The user aborted a request.')); + + try { + return await axiosClient.request(requestConfig); + } catch (error) { + const axiosError = error as AxiosError; + if (axiosError.response) { + return axiosError.response; + } + throw error; } - throw error - } -} - -export const getResponseHeader = ( - response: AxiosResponse, - responseHeader?: string, -): string | undefined => { - if (responseHeader) { - const content = response.headers[responseHeader] - if (isString(content)) { - return content +}; + +export const getResponseHeader = (response: AxiosResponse, responseHeader?: string): string | undefined => { + if (responseHeader) { + const content = response.headers[responseHeader]; + if (isString(content)) { + return content; + } } - } - return undefined -} + return undefined; +}; export const getResponseBody = (response: AxiosResponse): any => { - if (response.status !== 204) { - return response.data - } - return undefined -} - -export const catchErrorCodes = ( - options: ApiRequestOptions, - result: ApiResult, -): void => { - const errors: Record = { - 400: 'Bad Request', - 401: 'Unauthorized', - 403: 'Forbidden', - 404: 'Not Found', - 500: 'Internal Server Error', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - ...options.errors, - } - - const error = errors[result.status] - if (error) { - throw new ApiError(options, result, error) - } - - if (!result.ok) { - const errorStatus = result.status ?? 'unknown' - const errorStatusText = result.statusText ?? 'unknown' - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2) - } catch (e) { - return undefined - } - })() - - throw new ApiError( - options, - result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`, - ) - } -} + if (response.status !== 204) { + return response.data; + } + return undefined; +}; + +export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { + const errors: Record = { + 400: 'Bad Request', + 401: 'Unauthorized', + 403: 'Forbidden', + 404: 'Not Found', + 500: 'Internal Server Error', + 502: 'Bad Gateway', + 503: 'Service Unavailable', + ...options.errors, + } + + const error = errors[result.status]; + if (error) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + const errorStatus = result.status ?? 'unknown'; + const errorStatusText = result.statusText ?? 'unknown'; + const errorBody = (() => { + try { + return JSON.stringify(result.body, null, 2); + } catch (e) { + return undefined; + } + })(); + + throw new ApiError(options, result, + `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` + ); + } +}; /** * Request method @@ -320,49 +291,33 @@ export const catchErrorCodes = ( * @returns CancelablePromise * @throws ApiError */ -export const request = ( - config: OpenAPIConfig, - options: ApiRequestOptions, - axiosClient: AxiosInstance = axios, -): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options) - const formData = getFormData(options) - const body = getRequestBody(options) - const headers = await getHeaders(config, options, formData) - - if (!onCancel.isCancelled) { - const response = await sendRequest( - config, - options, - url, - body, - formData, - headers, - onCancel, - axiosClient, - ) - const responseBody = getResponseBody(response) - const responseHeader = getResponseHeader( - response, - options.responseHeader, - ) - - const result: ApiResult = { - url, - ok: isSuccess(response.status), - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, +export const request = (config: OpenAPIConfig, options: ApiRequestOptions, axiosClient: AxiosInstance = axios): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options, formData); + + if (!onCancel.isCancelled) { + const response = await sendRequest(config, options, url, body, formData, headers, onCancel, axiosClient); + const responseBody = getResponseBody(response); + const responseHeader = getResponseHeader(response, options.responseHeader); + + const result: ApiResult = { + url, + ok: isSuccess(response.status), + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); } - - catchErrorCodes(options, result) - - resolve(result.body) - } - } catch (error) { - reject(error) - } - }) -} + }); +}; diff --git a/generated/index.ts b/generated/index.ts index cb2d1db..c3bb120 100644 --- a/generated/index.ts +++ b/generated/index.ts @@ -2,72 +2,77 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export { ApiError } from './core/ApiError' -export { CancelablePromise, CancelError } from './core/CancelablePromise' -export { OpenAPI } from './core/OpenAPI' -export type { OpenAPIConfig } from './core/OpenAPI' +export { ApiError } from './core/ApiError'; +export { CancelablePromise, CancelError } from './core/CancelablePromise'; +export { OpenAPI } from './core/OpenAPI'; +export type { OpenAPIConfig } from './core/OpenAPI'; -export type { BaseResponse } from './models/BaseResponse' -export type { BaseResponse_boolean_ } from './models/BaseResponse_boolean_' -export type { BaseResponse_CoursesDTO_ } from './models/BaseResponse_CoursesDTO_' -export type { BaseResponse_List_CourseObjectivesTreeVO_ } from './models/BaseResponse_List_CourseObjectivesTreeVO_' -export type { BaseResponse_List_CourseResources_ } from './models/BaseResponse_List_CourseResources_' -export type { BaseResponse_List_LearningRecords_ } from './models/BaseResponse_List_LearningRecords_' -export type { BaseResponse_List_ObjectivesType_ } from './models/BaseResponse_List_ObjectivesType_' -export type { BaseResponse_List_TeacherInfVO_ } from './models/BaseResponse_List_TeacherInfVO_' -export type { BaseResponse_long_ } from './models/BaseResponse_long_' -export type { BaseResponse_Map_string_object_ } from './models/BaseResponse_Map_string_object_' -export type { BaseResponse_ObjectiveContentKnowVO_ } from './models/BaseResponse_ObjectiveContentKnowVO_' -export type { BaseResponse_ObjectiveContents_ } from './models/BaseResponse_ObjectiveContents_' -export type { BaseResponse_Page_ } from './models/BaseResponse_Page_' -export type { BaseResponse_Page_CourseFavourDetailVO_ } from './models/BaseResponse_Page_CourseFavourDetailVO_' -export type { BaseResponse_Page_CourseResources_ } from './models/BaseResponse_Page_CourseResources_' -export type { BaseResponse_PageDTO_CoursesVO_ } from './models/BaseResponse_PageDTO_CoursesVO_' -export type { BaseResponse_string_ } from './models/BaseResponse_string_' -export type { CommonResult } from './models/CommonResult' -export type { CommonResult_string_ } from './models/CommonResult_string_' -export type { CommonResult_UmsAdmin_ } from './models/CommonResult_UmsAdmin_' -export type { CourseFavourAddRequest } from './models/CourseFavourAddRequest' -export type { CourseFavourAllRequest } from './models/CourseFavourAllRequest' -export type { CourseFavourDetailVO } from './models/CourseFavourDetailVO' -export type { CourseFavourQueryRequest } from './models/CourseFavourQueryRequest' -export type { CourseObjectivesDTO } from './models/CourseObjectivesDTO' -export type { CourseObjectivesTreeVO } from './models/CourseObjectivesTreeVO' -export type { CourseResources } from './models/CourseResources' -export type { CoursesDTO } from './models/CoursesDTO' -export type { CoursesVO } from './models/CoursesVO' -export type { CourseThumbAddRequest } from './models/CourseThumbAddRequest' -export type { KnowFavourAddRequest } from './models/KnowFavourAddRequest' -export type { KnowThumbAddRequest } from './models/KnowThumbAddRequest' -export type { LearningRecords } from './models/LearningRecords' -export type { ObjectiveContentKnowDTO } from './models/ObjectiveContentKnowDTO' -export type { ObjectiveContentKnowVO } from './models/ObjectiveContentKnowVO' -export type { ObjectiveContents_ } from './models/ObjectiveContents_' -export type { ObjectivesType_ } from './models/ObjectivesType_' -export type { OrderItem } from './models/OrderItem' -export type { Page } from './models/Page' -export type { Page_CourseFavourDetailVO_ } from './models/Page_CourseFavourDetailVO_' -export type { Page_CourseResources_ } from './models/Page_CourseResources_' -export type { PageDTO_CoursesVO_ } from './models/PageDTO_CoursesVO_' -export type { ResourceFavourAddRequest } from './models/ResourceFavourAddRequest' -export type { ResourceFavourQueryRequest } from './models/ResourceFavourQueryRequest' -export type { ResourceThumbAddRequest } from './models/ResourceThumbAddRequest' -export type { StudentCoursesDTO } from './models/StudentCoursesDTO' -export type { TeacherInfVO } from './models/TeacherInfVO' -export type { UmsAdmin } from './models/UmsAdmin' -export type { UmsAdminParam } from './models/UmsAdminParam' -export type { UmsStudentAndTeacherDTO } from './models/UmsStudentAndTeacherDTO' -export type { UpdateAdminPasswordParam } from './models/UpdateAdminPasswordParam' +export type { BaseResponse } from './models/BaseResponse'; +export type { BaseResponse_boolean_ } from './models/BaseResponse_boolean_'; +export type { BaseResponse_CoursesDTO_ } from './models/BaseResponse_CoursesDTO_'; +export type { BaseResponse_List_CourseObjectivesTreeVO_ } from './models/BaseResponse_List_CourseObjectivesTreeVO_'; +export type { BaseResponse_List_CourseResources_ } from './models/BaseResponse_List_CourseResources_'; +export type { BaseResponse_List_LearningRecords_ } from './models/BaseResponse_List_LearningRecords_'; +export type { BaseResponse_List_ObjectivesType_ } from './models/BaseResponse_List_ObjectivesType_'; +export type { BaseResponse_List_TeacherInfVO_ } from './models/BaseResponse_List_TeacherInfVO_'; +export type { BaseResponse_long_ } from './models/BaseResponse_long_'; +export type { BaseResponse_Map_string_object_ } from './models/BaseResponse_Map_string_object_'; +export type { BaseResponse_ObjectiveContentKnowVO_ } from './models/BaseResponse_ObjectiveContentKnowVO_'; +export type { BaseResponse_ObjectiveContents_ } from './models/BaseResponse_ObjectiveContents_'; +export type { BaseResponse_Page_ } from './models/BaseResponse_Page_'; +export type { BaseResponse_Page_CourseFavourDetailVO_ } from './models/BaseResponse_Page_CourseFavourDetailVO_'; +export type { BaseResponse_Page_CourseResources_ } from './models/BaseResponse_Page_CourseResources_'; +export type { BaseResponse_PageDTO_CoursesVO_ } from './models/BaseResponse_PageDTO_CoursesVO_'; +export type { BaseResponse_string_ } from './models/BaseResponse_string_'; +export type { CommonResult } from './models/CommonResult'; +export type { CommonResult_string_ } from './models/CommonResult_string_'; +export type { CommonResult_UmsAdmin_ } from './models/CommonResult_UmsAdmin_'; +export type { CourseFavourAddRequest } from './models/CourseFavourAddRequest'; +export type { CourseFavourAllRequest } from './models/CourseFavourAllRequest'; +export type { CourseFavourDetailVO } from './models/CourseFavourDetailVO'; +export type { CourseFavourQueryRequest } from './models/CourseFavourQueryRequest'; +export type { CourseObjectivesDTO } from './models/CourseObjectivesDTO'; +export type { CourseObjectivesTreeVO } from './models/CourseObjectivesTreeVO'; +export type { CourseResources } from './models/CourseResources'; +export type { CoursesDTO } from './models/CoursesDTO'; +export type { CoursesVO } from './models/CoursesVO'; +export type { CourseThumbAddRequest } from './models/CourseThumbAddRequest'; +export type { Know } from './models/Know'; +export type { KnowFavourAddRequest } from './models/KnowFavourAddRequest'; +export type { KnowQueryRequest } from './models/KnowQueryRequest'; +export type { KnowRequest } from './models/KnowRequest'; +export type { KnowThumbAddRequest } from './models/KnowThumbAddRequest'; +export type { KnowupdateRequest } from './models/KnowupdateRequest'; +export type { LearningRecords } from './models/LearningRecords'; +export type { ObjectiveContentKnowDTO } from './models/ObjectiveContentKnowDTO'; +export type { ObjectiveContentKnowVO } from './models/ObjectiveContentKnowVO'; +export type { ObjectiveContents_ } from './models/ObjectiveContents_'; +export type { ObjectivesType_ } from './models/ObjectivesType_'; +export type { OrderItem } from './models/OrderItem'; +export type { Page } from './models/Page'; +export type { Page_CourseFavourDetailVO_ } from './models/Page_CourseFavourDetailVO_'; +export type { Page_CourseResources_ } from './models/Page_CourseResources_'; +export type { PageDTO_CoursesVO_ } from './models/PageDTO_CoursesVO_'; +export type { ResourceFavourAddRequest } from './models/ResourceFavourAddRequest'; +export type { ResourceFavourQueryRequest } from './models/ResourceFavourQueryRequest'; +export type { ResourceThumbAddRequest } from './models/ResourceThumbAddRequest'; +export type { StudentCoursesDTO } from './models/StudentCoursesDTO'; +export type { TeacherInfVO } from './models/TeacherInfVO'; +export type { UmsAdmin } from './models/UmsAdmin'; +export type { UmsAdminParam } from './models/UmsAdminParam'; +export type { UmsStudentAndTeacherDTO } from './models/UmsStudentAndTeacherDTO'; +export type { UpdateAdminPasswordParam } from './models/UpdateAdminPasswordParam'; -export { Service } from './services/Service' -export { CourseResourceControllerService } from './services/CourseResourceControllerService' -export { FavourInformationControllerService } from './services/FavourInformationControllerService' -export { LearningRecordsControllerService } from './services/LearningRecordsControllerService' -export { ResourceControllerService } from './services/ResourceControllerService' -export { SeCourseFavourControllerService } from './services/SeCourseFavourControllerService' -export { SeCourseThumbControllerService } from './services/SeCourseThumbControllerService' -export { SeKnowFavourControllerService } from './services/SeKnowFavourControllerService' -export { SeKnowThumbControllerService } from './services/SeKnowThumbControllerService' -export { SeResourceFavourControllerService } from './services/SeResourceFavourControllerService' -export { SeResourceThumbControllerService } from './services/SeResourceThumbControllerService' -export { UmsAdminControllerService } from './services/UmsAdminControllerService' +export { Service } from './services/Service'; +export { CourseResourceControllerService } from './services/CourseResourceControllerService'; +export { FavourInformationControllerService } from './services/FavourInformationControllerService'; +export { KnowControllerService } from './services/KnowControllerService'; +export { LearningRecordsControllerService } from './services/LearningRecordsControllerService'; +export { ResourceControllerService } from './services/ResourceControllerService'; +export { SeCourseFavourControllerService } from './services/SeCourseFavourControllerService'; +export { SeCourseThumbControllerService } from './services/SeCourseThumbControllerService'; +export { SeKnowFavourControllerService } from './services/SeKnowFavourControllerService'; +export { SeKnowThumbControllerService } from './services/SeKnowThumbControllerService'; +export { SeResourceFavourControllerService } from './services/SeResourceFavourControllerService'; +export { SeResourceThumbControllerService } from './services/SeResourceThumbControllerService'; +export { UmsAdminControllerService } from './services/UmsAdminControllerService'; diff --git a/generated/models/BaseResponse.ts b/generated/models/BaseResponse.ts index 326cf23..ca4a45a 100644 --- a/generated/models/BaseResponse.ts +++ b/generated/models/BaseResponse.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type BaseResponse = { - code?: number - data?: any - message?: string -} + code?: number; + data?: any; + message?: string; +}; + diff --git a/generated/models/BaseResponse_CoursesDTO_.ts b/generated/models/BaseResponse_CoursesDTO_.ts index fe8cd8d..f6077df 100644 --- a/generated/models/BaseResponse_CoursesDTO_.ts +++ b/generated/models/BaseResponse_CoursesDTO_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CoursesDTO } from './CoursesDTO' +import type { CoursesDTO } from './CoursesDTO'; export type BaseResponse_CoursesDTO_ = { - code?: number - data?: CoursesDTO - message?: string -} + code?: number; + data?: CoursesDTO; + message?: string; +}; + diff --git a/generated/models/BaseResponse_List_CourseObjectivesTreeVO_.ts b/generated/models/BaseResponse_List_CourseObjectivesTreeVO_.ts index e072a4a..58b8ebd 100644 --- a/generated/models/BaseResponse_List_CourseObjectivesTreeVO_.ts +++ b/generated/models/BaseResponse_List_CourseObjectivesTreeVO_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CourseObjectivesTreeVO } from './CourseObjectivesTreeVO' +import type { CourseObjectivesTreeVO } from './CourseObjectivesTreeVO'; export type BaseResponse_List_CourseObjectivesTreeVO_ = { - code?: number - data?: Array - message?: string -} + code?: number; + data?: Array; + message?: string; +}; + diff --git a/generated/models/BaseResponse_List_CourseResources_.ts b/generated/models/BaseResponse_List_CourseResources_.ts index 13843dd..ffd9180 100644 --- a/generated/models/BaseResponse_List_CourseResources_.ts +++ b/generated/models/BaseResponse_List_CourseResources_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CourseResources } from './CourseResources' +import type { CourseResources } from './CourseResources'; export type BaseResponse_List_CourseResources_ = { - code?: number - data?: Array - message?: string -} + code?: number; + data?: Array; + message?: string; +}; + diff --git a/generated/models/BaseResponse_List_LearningRecords_.ts b/generated/models/BaseResponse_List_LearningRecords_.ts index 701fcf7..7b95a82 100644 --- a/generated/models/BaseResponse_List_LearningRecords_.ts +++ b/generated/models/BaseResponse_List_LearningRecords_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { LearningRecords } from './LearningRecords' +import type { LearningRecords } from './LearningRecords'; export type BaseResponse_List_LearningRecords_ = { - code?: number - data?: Array - message?: string -} + code?: number; + data?: Array; + message?: string; +}; + diff --git a/generated/models/BaseResponse_List_ObjectivesType_.ts b/generated/models/BaseResponse_List_ObjectivesType_.ts index 4c98829..b2cccac 100644 --- a/generated/models/BaseResponse_List_ObjectivesType_.ts +++ b/generated/models/BaseResponse_List_ObjectivesType_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ObjectivesType_ } from './ObjectivesType_' +import type { ObjectivesType_ } from './ObjectivesType_'; export type BaseResponse_List_ObjectivesType_ = { - code?: number - data?: Array - message?: string -} + code?: number; + data?: Array; + message?: string; +}; + diff --git a/generated/models/BaseResponse_List_TeacherInfVO_.ts b/generated/models/BaseResponse_List_TeacherInfVO_.ts index 7f24723..e2c919f 100644 --- a/generated/models/BaseResponse_List_TeacherInfVO_.ts +++ b/generated/models/BaseResponse_List_TeacherInfVO_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { TeacherInfVO } from './TeacherInfVO' +import type { TeacherInfVO } from './TeacherInfVO'; export type BaseResponse_List_TeacherInfVO_ = { - code?: number - data?: Array - message?: string -} + code?: number; + data?: Array; + message?: string; +}; + diff --git a/generated/models/BaseResponse_Map_string_object_.ts b/generated/models/BaseResponse_Map_string_object_.ts index 41badb6..38d46ff 100644 --- a/generated/models/BaseResponse_Map_string_object_.ts +++ b/generated/models/BaseResponse_Map_string_object_.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type BaseResponse_Map_string_object_ = { - code?: number - data?: any - message?: string -} + code?: number; + data?: any; + message?: string; +}; + diff --git a/generated/models/BaseResponse_ObjectiveContentKnowVO_.ts b/generated/models/BaseResponse_ObjectiveContentKnowVO_.ts index aa41cc5..6ae7f5f 100644 --- a/generated/models/BaseResponse_ObjectiveContentKnowVO_.ts +++ b/generated/models/BaseResponse_ObjectiveContentKnowVO_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ObjectiveContentKnowVO } from './ObjectiveContentKnowVO' +import type { ObjectiveContentKnowVO } from './ObjectiveContentKnowVO'; export type BaseResponse_ObjectiveContentKnowVO_ = { - code?: number - data?: ObjectiveContentKnowVO - message?: string -} + code?: number; + data?: ObjectiveContentKnowVO; + message?: string; +}; + diff --git a/generated/models/BaseResponse_ObjectiveContents_.ts b/generated/models/BaseResponse_ObjectiveContents_.ts index 5ba8ecc..2900ff2 100644 --- a/generated/models/BaseResponse_ObjectiveContents_.ts +++ b/generated/models/BaseResponse_ObjectiveContents_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ObjectiveContents_ } from './ObjectiveContents_' +import type { ObjectiveContents_ } from './ObjectiveContents_'; export type BaseResponse_ObjectiveContents_ = { - code?: number - data?: ObjectiveContents_ - message?: string -} + code?: number; + data?: ObjectiveContents_; + message?: string; +}; + diff --git a/generated/models/BaseResponse_PageDTO_CoursesVO_.ts b/generated/models/BaseResponse_PageDTO_CoursesVO_.ts index 07c104e..7770dbd 100644 --- a/generated/models/BaseResponse_PageDTO_CoursesVO_.ts +++ b/generated/models/BaseResponse_PageDTO_CoursesVO_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { PageDTO_CoursesVO_ } from './PageDTO_CoursesVO_' +import type { PageDTO_CoursesVO_ } from './PageDTO_CoursesVO_'; export type BaseResponse_PageDTO_CoursesVO_ = { - code?: number - data?: PageDTO_CoursesVO_ - message?: string -} + code?: number; + data?: PageDTO_CoursesVO_; + message?: string; +}; + diff --git a/generated/models/BaseResponse_Page_.ts b/generated/models/BaseResponse_Page_.ts index 06507c9..178cd13 100644 --- a/generated/models/BaseResponse_Page_.ts +++ b/generated/models/BaseResponse_Page_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Page } from './Page' +import type { Page } from './Page'; export type BaseResponse_Page_ = { - code?: number - data?: Page - message?: string -} + code?: number; + data?: Page; + message?: string; +}; + diff --git a/generated/models/BaseResponse_Page_CourseFavourDetailVO_.ts b/generated/models/BaseResponse_Page_CourseFavourDetailVO_.ts index aa2daf5..c9b14bb 100644 --- a/generated/models/BaseResponse_Page_CourseFavourDetailVO_.ts +++ b/generated/models/BaseResponse_Page_CourseFavourDetailVO_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Page_CourseFavourDetailVO_ } from './Page_CourseFavourDetailVO_' +import type { Page_CourseFavourDetailVO_ } from './Page_CourseFavourDetailVO_'; export type BaseResponse_Page_CourseFavourDetailVO_ = { - code?: number - data?: Page_CourseFavourDetailVO_ - message?: string -} + code?: number; + data?: Page_CourseFavourDetailVO_; + message?: string; +}; + diff --git a/generated/models/BaseResponse_Page_CourseResources_.ts b/generated/models/BaseResponse_Page_CourseResources_.ts index 361764c..9d10a09 100644 --- a/generated/models/BaseResponse_Page_CourseResources_.ts +++ b/generated/models/BaseResponse_Page_CourseResources_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Page_CourseResources_ } from './Page_CourseResources_' +import type { Page_CourseResources_ } from './Page_CourseResources_'; export type BaseResponse_Page_CourseResources_ = { - code?: number - data?: Page_CourseResources_ - message?: string -} + code?: number; + data?: Page_CourseResources_; + message?: string; +}; + diff --git a/generated/models/BaseResponse_boolean_.ts b/generated/models/BaseResponse_boolean_.ts index 176f282..bef369a 100644 --- a/generated/models/BaseResponse_boolean_.ts +++ b/generated/models/BaseResponse_boolean_.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type BaseResponse_boolean_ = { - code?: number - data?: boolean - message?: string -} + code?: number; + data?: boolean; + message?: string; +}; + diff --git a/generated/models/BaseResponse_long_.ts b/generated/models/BaseResponse_long_.ts index b7b77bb..651159a 100644 --- a/generated/models/BaseResponse_long_.ts +++ b/generated/models/BaseResponse_long_.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type BaseResponse_long_ = { - code?: number - data?: number - message?: string -} + code?: number; + data?: number; + message?: string; +}; + diff --git a/generated/models/BaseResponse_string_.ts b/generated/models/BaseResponse_string_.ts index 57dd357..57b9800 100644 --- a/generated/models/BaseResponse_string_.ts +++ b/generated/models/BaseResponse_string_.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type BaseResponse_string_ = { - code?: number - data?: string - message?: string -} + code?: number; + data?: string; + message?: string; +}; + diff --git a/generated/models/CommonResult.ts b/generated/models/CommonResult.ts index 9a8293d..727780a 100644 --- a/generated/models/CommonResult.ts +++ b/generated/models/CommonResult.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type CommonResult = { - code?: number - data?: any - message?: string -} + code?: number; + data?: any; + message?: string; +}; + diff --git a/generated/models/CommonResult_UmsAdmin_.ts b/generated/models/CommonResult_UmsAdmin_.ts index beb6f67..e4a3331 100644 --- a/generated/models/CommonResult_UmsAdmin_.ts +++ b/generated/models/CommonResult_UmsAdmin_.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { UmsAdmin } from './UmsAdmin' +import type { UmsAdmin } from './UmsAdmin'; export type CommonResult_UmsAdmin_ = { - code?: number - data?: UmsAdmin - message?: string -} + code?: number; + data?: UmsAdmin; + message?: string; +}; + diff --git a/generated/models/CommonResult_string_.ts b/generated/models/CommonResult_string_.ts index 0b7aa3d..a2cda78 100644 --- a/generated/models/CommonResult_string_.ts +++ b/generated/models/CommonResult_string_.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type CommonResult_string_ = { - code?: number - data?: string - message?: string -} + code?: number; + data?: string; + message?: string; +}; + diff --git a/generated/models/CourseFavourAddRequest.ts b/generated/models/CourseFavourAddRequest.ts index 701feb2..8419263 100644 --- a/generated/models/CourseFavourAddRequest.ts +++ b/generated/models/CourseFavourAddRequest.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type CourseFavourAddRequest = { - courseId?: string - userId?: string -} + courseId?: string; + userId?: string; +}; + diff --git a/generated/models/CourseFavourAllRequest.ts b/generated/models/CourseFavourAllRequest.ts index eb19336..fd2404b 100644 --- a/generated/models/CourseFavourAllRequest.ts +++ b/generated/models/CourseFavourAllRequest.ts @@ -3,5 +3,6 @@ /* tslint:disable */ /* eslint-disable */ export type CourseFavourAllRequest = { - courseId?: string -} + courseId?: string; +}; + diff --git a/generated/models/CourseFavourDetailVO.ts b/generated/models/CourseFavourDetailVO.ts index 6fe8dba..8dab3fc 100644 --- a/generated/models/CourseFavourDetailVO.ts +++ b/generated/models/CourseFavourDetailVO.ts @@ -3,19 +3,20 @@ /* tslint:disable */ /* eslint-disable */ export type CourseFavourDetailVO = { - /** - * 课程学时 - */ - classhours: number - /** - * 课程学分 - */ - credit: number - id?: string - img?: string - name?: string - /** - * 教师id - */ - teacher?: string -} + /** + * 课程学时 + */ + classhours: number; + /** + * 课程学分 + */ + credit: number; + id?: string; + img?: string; + name?: string; + /** + * 教师id + */ + teacher?: string; +}; + diff --git a/generated/models/CourseFavourQueryRequest.ts b/generated/models/CourseFavourQueryRequest.ts index f9c6385..8dc3294 100644 --- a/generated/models/CourseFavourQueryRequest.ts +++ b/generated/models/CourseFavourQueryRequest.ts @@ -3,9 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type CourseFavourQueryRequest = { - current?: number - pageSize?: number - sortField?: string - sortOrder?: string - userId?: string -} + current?: number; + pageSize?: number; + sortField?: string; + sortOrder?: string; + userId?: string; +}; + diff --git a/generated/models/CourseObjectivesDTO.ts b/generated/models/CourseObjectivesDTO.ts index 5ddfd26..f0618bc 100644 --- a/generated/models/CourseObjectivesDTO.ts +++ b/generated/models/CourseObjectivesDTO.ts @@ -6,20 +6,21 @@ * 分项目标参数实体 */ export type CourseObjectivesDTO = { - /** - * id - */ - id?: string - /** - * 分项目标名称 - */ - name: string - /** - * 父节点pid - */ - pid: string - /** - * 分项目标类型 - */ - type: number -} + /** + * id + */ + id?: string; + /** + * 分项目标名称 + */ + name: string; + /** + * 父节点pid + */ + pid: string; + /** + * 分项目标类型 + */ + type: number; +}; + diff --git a/generated/models/CourseObjectivesTreeVO.ts b/generated/models/CourseObjectivesTreeVO.ts index df06594..36d5bf1 100644 --- a/generated/models/CourseObjectivesTreeVO.ts +++ b/generated/models/CourseObjectivesTreeVO.ts @@ -2,49 +2,50 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ObjectiveContents_ } from './ObjectiveContents_' +import type { ObjectiveContents_ } from './ObjectiveContents_'; /** * 课程目标参数实体 */ export type CourseObjectivesTreeVO = { - /** - * 目标内容列表 - */ - contents?: Array - /** - * 课程id - */ - courseId?: string - /** - * 课程目标 - */ - courseObjectivesTrees?: Array - /** - * 是否有子节点 - */ - hasChild?: number - /** - * 内部编号 - */ - id?: string - /** - * 目标名称 - */ - name?: string - /** - * 父级节点 - */ - pid?: string - /** - * 毕业要求id - */ - requireid?: string - /** - * 毕业要求 - */ - temp?: string - /** - * 目标类型 - */ - type?: number -} + /** + * 目标内容列表 + */ + contents?: Array; + /** + * 课程id + */ + courseId?: string; + /** + * 课程目标 + */ + courseObjectivesTrees?: Array; + /** + * 是否有子节点 + */ + hasChild?: number; + /** + * 内部编号 + */ + id?: string; + /** + * 目标名称 + */ + name?: string; + /** + * 父级节点 + */ + pid?: string; + /** + * 毕业要求id + */ + requireid?: string; + /** + * 毕业要求 + */ + temp?: string; + /** + * 目标类型 + */ + type?: number; +}; + diff --git a/generated/models/CourseResources.ts b/generated/models/CourseResources.ts index 470c2a8..ce17443 100644 --- a/generated/models/CourseResources.ts +++ b/generated/models/CourseResources.ts @@ -3,12 +3,13 @@ /* tslint:disable */ /* eslint-disable */ export type CourseResources = { - description?: string - id?: number - img?: string - name?: string - path?: string - status?: number - tags?: string - type?: number -} + description?: string; + id?: number; + img?: string; + name?: string; + path?: string; + status?: number; + tags?: string; + type?: number; +}; + diff --git a/generated/models/CourseThumbAddRequest.ts b/generated/models/CourseThumbAddRequest.ts index 6d0466d..bbacebd 100644 --- a/generated/models/CourseThumbAddRequest.ts +++ b/generated/models/CourseThumbAddRequest.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type CourseThumbAddRequest = { - courseId?: string - userId?: string -} + courseId?: string; + userId?: string; +}; + diff --git a/generated/models/CoursesDTO.ts b/generated/models/CoursesDTO.ts index 5bfcae4..ec22183 100644 --- a/generated/models/CoursesDTO.ts +++ b/generated/models/CoursesDTO.ts @@ -6,64 +6,65 @@ * 教师创建课程参数实体 */ export type CoursesDTO = { - /** - * 考核类型:考试1 考查2 - */ - assessmenttype: string - /** - * 考核方式:开卷1 闭卷2 其他3 - */ - assessmentway: string - /** - * 课程类别:专业教育1 通识教育2 - */ - category: string - /** - * 课程学时 - */ - classhours: number - /** - * 课程编码 - */ - code: string - /** - * 创建日期 - */ - createTime?: string - /** - * 课程学分 - */ - credit: number - /** - * 课程简介 - */ - description?: string - /** - * id - */ - id?: string - /** - * 图片 - */ - img?: string - /** - * 课程名称 - */ - name: string - /** - * 课程性质:必修1 选修2 任修3 - */ - nature: string - /** - * 负责教师 - */ - teacher: string - /** - * 教学方法 - */ - teachermethod?: string - /** - * 教学方式 - */ - teacherway?: string -} + /** + * 考核类型:考试1 考查2 + */ + assessmenttype: string; + /** + * 考核方式:开卷1 闭卷2 其他3 + */ + assessmentway: string; + /** + * 课程类别:专业教育1 通识教育2 + */ + category: string; + /** + * 课程学时 + */ + classhours: number; + /** + * 课程编码 + */ + code: string; + /** + * 创建日期 + */ + createTime?: string; + /** + * 课程学分 + */ + credit: number; + /** + * 课程简介 + */ + description?: string; + /** + * id + */ + id?: string; + /** + * 图片 + */ + img: string; + /** + * 课程名称 + */ + name: string; + /** + * 课程性质:必修1 选修2 任修3 + */ + nature: string; + /** + * 负责教师 + */ + teacher: string; + /** + * 教学方法 + */ + teachermethod?: string; + /** + * 教学方式 + */ + teacherway?: string; +}; + diff --git a/generated/models/CoursesVO.ts b/generated/models/CoursesVO.ts index 1a045b0..5e90201 100644 --- a/generated/models/CoursesVO.ts +++ b/generated/models/CoursesVO.ts @@ -6,44 +6,45 @@ * 课程VO实体 */ export type CoursesVO = { - /** - * 课程学时 - */ - classhours: number - /** - * 课程学分 - */ - credit: number - /** - * 课程描述 - */ - description: string - /** - * id - */ - id?: string - /** - * 图片 - */ - img?: string - /** - * 课程名称 - */ - name: string - /** - * 教师 - */ - teacher?: string - /** - * 课程总学时 - */ - totalHours: number - /** - * 课程知识点总数 - */ - totalKnow: number - /** - * 课程章节总数 - */ - totalchapter: number -} + /** + * 课程学时 + */ + classhours: number; + /** + * 课程学分 + */ + credit: number; + /** + * 课程描述 + */ + description: string; + /** + * id + */ + id?: string; + /** + * 图片 + */ + img?: string; + /** + * 课程名称 + */ + name: string; + /** + * 教师 + */ + teacher?: string; + /** + * 课程总学时 + */ + totalHours: number; + /** + * 课程知识点总数 + */ + totalKnow: number; + /** + * 课程章节总数 + */ + totalchapter: number; +}; + diff --git a/generated/models/Know.ts b/generated/models/Know.ts new file mode 100644 index 0000000..1ac0e73 --- /dev/null +++ b/generated/models/Know.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type Know = { + content?: string; + hour?: number; + id?: number; + img?: string; + info?: string; + name?: string; + resourceid?: string; +}; + diff --git a/generated/models/KnowFavourAddRequest.ts b/generated/models/KnowFavourAddRequest.ts index 3906881..8239ca7 100644 --- a/generated/models/KnowFavourAddRequest.ts +++ b/generated/models/KnowFavourAddRequest.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type KnowFavourAddRequest = { - courseId?: string - knowId?: string - userId?: string -} + courseId?: string; + knowId?: string; + userId?: string; +}; + diff --git a/generated/models/KnowQueryRequest.ts b/generated/models/KnowQueryRequest.ts new file mode 100644 index 0000000..a4414c7 --- /dev/null +++ b/generated/models/KnowQueryRequest.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type KnowQueryRequest = { + name?: string; +}; + diff --git a/generated/models/KnowRequest.ts b/generated/models/KnowRequest.ts new file mode 100644 index 0000000..700c8be --- /dev/null +++ b/generated/models/KnowRequest.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type KnowRequest = { + content?: string; + hour?: number; + img?: string; + info?: string; + name?: string; + resourceid?: string; +}; + diff --git a/generated/models/KnowThumbAddRequest.ts b/generated/models/KnowThumbAddRequest.ts index 8b86a5a..0ce5b07 100644 --- a/generated/models/KnowThumbAddRequest.ts +++ b/generated/models/KnowThumbAddRequest.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type KnowThumbAddRequest = { - knowId?: number - userId?: string -} + knowId?: number; + userId?: string; +}; + diff --git a/generated/models/KnowupdateRequest.ts b/generated/models/KnowupdateRequest.ts new file mode 100644 index 0000000..1ee752a --- /dev/null +++ b/generated/models/KnowupdateRequest.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type KnowupdateRequest = { + content?: string; + hour?: number; + id?: number; + img?: string; + info?: string; + name?: string; + resourceid?: string; +}; + diff --git a/generated/models/LearningRecords.ts b/generated/models/LearningRecords.ts index f2520f1..4672ff2 100644 --- a/generated/models/LearningRecords.ts +++ b/generated/models/LearningRecords.ts @@ -3,19 +3,20 @@ /* tslint:disable */ /* eslint-disable */ export type LearningRecords = { - accessTime?: string - address?: string - chapterId?: string - content?: string - coursesId?: string - download?: string - id?: string - isCompleted?: string - knowledgePointId?: string - open?: string - parentNode?: string - resourceId?: string - status?: string - type?: string - userId?: string -} + accessTime?: string; + address?: string; + chapterId?: string; + content?: string; + coursesId?: string; + download?: string; + id?: string; + isCompleted?: string; + knowledgePointId?: string; + open?: string; + parentNode?: string; + resourceId?: string; + status?: string; + type?: string; + userId?: string; +}; + diff --git a/generated/models/ObjectiveContentKnowDTO.ts b/generated/models/ObjectiveContentKnowDTO.ts index 72d5f28..2b148a3 100644 --- a/generated/models/ObjectiveContentKnowDTO.ts +++ b/generated/models/ObjectiveContentKnowDTO.ts @@ -6,10 +6,11 @@ * 分项目标或内容添加知识点 */ export type ObjectiveContentKnowDTO = { - /** - * 雪花算法生成的主键 - */ - id?: string - know?: string - objectiveOrContent?: string -} + /** + * 雪花算法生成的主键 + */ + id?: string; + know?: string; + objectiveOrContent?: string; +}; + diff --git a/generated/models/ObjectiveContentKnowVO.ts b/generated/models/ObjectiveContentKnowVO.ts index c433bfa..4a35997 100644 --- a/generated/models/ObjectiveContentKnowVO.ts +++ b/generated/models/ObjectiveContentKnowVO.ts @@ -6,18 +6,19 @@ * 分项目标,内容关联的知识点VO实体 */ export type ObjectiveContentKnowVO = { - contentKnowsData?: Array - /** - * 关联的知识点个数 - */ - knowsNumber?: number - /** - * 关联的知识点学时合计 - */ - knowsTime?: number - objectiveOrContent?: string - /** - * 关联的知识点学时占比 - */ - persent?: string -} + contentKnowsData?: Array; + /** + * 关联的知识点个数 + */ + knowsNumber?: number; + /** + * 关联的知识点学时合计 + */ + knowsTime?: number; + objectiveOrContent?: string; + /** + * 关联的知识点学时占比 + */ + persent?: string; +}; + diff --git a/generated/models/ObjectiveContents_.ts b/generated/models/ObjectiveContents_.ts index a5bdac5..d95b0db 100644 --- a/generated/models/ObjectiveContents_.ts +++ b/generated/models/ObjectiveContents_.ts @@ -3,13 +3,14 @@ /* tslint:disable */ /* eslint-disable */ export type ObjectiveContents_ = { - /** - * 内容 - */ - content: string - id?: string - /** - * 对应的目标id - */ - objectiveId: string -} + /** + * 内容 + */ + content: string; + id?: string; + /** + * 对应的目标id + */ + objectiveId: string; +}; + diff --git a/generated/models/ObjectivesType_.ts b/generated/models/ObjectivesType_.ts index a6ab2e9..c31d68c 100644 --- a/generated/models/ObjectivesType_.ts +++ b/generated/models/ObjectivesType_.ts @@ -3,12 +3,13 @@ /* tslint:disable */ /* eslint-disable */ export type ObjectivesType_ = { - /** - * 类型编码,不用输入,使用自动生成 - */ - id?: number - /** - * 类型名称 - */ - typeName: string -} + /** + * 类型编码,不用输入,使用自动生成 + */ + id?: number; + /** + * 类型名称 + */ + typeName: string; +}; + diff --git a/generated/models/OrderItem.ts b/generated/models/OrderItem.ts index d5aee1f..5132aba 100644 --- a/generated/models/OrderItem.ts +++ b/generated/models/OrderItem.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type OrderItem = { - asc?: boolean - column?: string -} + asc?: boolean; + column?: string; +}; + diff --git a/generated/models/Page.ts b/generated/models/Page.ts index 528c393..a47053d 100644 --- a/generated/models/Page.ts +++ b/generated/models/Page.ts @@ -2,16 +2,17 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { OrderItem } from './OrderItem' +import type { OrderItem } from './OrderItem'; export type Page = { - countId?: string - current?: number - maxLimit?: number - optimizeCountSql?: boolean - orders?: Array - pages?: number - records?: Array - searchCount?: boolean - size?: number - total?: number -} + countId?: string; + current?: number; + maxLimit?: number; + optimizeCountSql?: boolean; + orders?: Array; + pages?: number; + records?: Array; + searchCount?: boolean; + size?: number; + total?: number; +}; + diff --git a/generated/models/PageDTO_CoursesVO_.ts b/generated/models/PageDTO_CoursesVO_.ts index 5600f02..6fdf4cd 100644 --- a/generated/models/PageDTO_CoursesVO_.ts +++ b/generated/models/PageDTO_CoursesVO_.ts @@ -2,21 +2,22 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CoursesVO } from './CoursesVO' +import type { CoursesVO } from './CoursesVO'; /** * 分页结果 */ export type PageDTO_CoursesVO_ = { - /** - * 集合 - */ - list?: Array - /** - * 总页数 - */ - pages?: number - /** - * 总条数 - */ - total?: number -} + /** + * 集合 + */ + list?: Array; + /** + * 总页数 + */ + pages?: number; + /** + * 总条数 + */ + total?: number; +}; + diff --git a/generated/models/Page_CourseFavourDetailVO_.ts b/generated/models/Page_CourseFavourDetailVO_.ts index c196f11..27bbd05 100644 --- a/generated/models/Page_CourseFavourDetailVO_.ts +++ b/generated/models/Page_CourseFavourDetailVO_.ts @@ -2,17 +2,18 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CourseFavourDetailVO } from './CourseFavourDetailVO' -import type { OrderItem } from './OrderItem' +import type { CourseFavourDetailVO } from './CourseFavourDetailVO'; +import type { OrderItem } from './OrderItem'; export type Page_CourseFavourDetailVO_ = { - countId?: string - current?: number - maxLimit?: number - optimizeCountSql?: boolean - orders?: Array - pages?: number - records?: Array - searchCount?: boolean - size?: number - total?: number -} + countId?: string; + current?: number; + maxLimit?: number; + optimizeCountSql?: boolean; + orders?: Array; + pages?: number; + records?: Array; + searchCount?: boolean; + size?: number; + total?: number; +}; + diff --git a/generated/models/Page_CourseResources_.ts b/generated/models/Page_CourseResources_.ts index db5a5ba..082736d 100644 --- a/generated/models/Page_CourseResources_.ts +++ b/generated/models/Page_CourseResources_.ts @@ -2,17 +2,18 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CourseResources } from './CourseResources' -import type { OrderItem } from './OrderItem' +import type { CourseResources } from './CourseResources'; +import type { OrderItem } from './OrderItem'; export type Page_CourseResources_ = { - countId?: string - current?: number - maxLimit?: number - optimizeCountSql?: boolean - orders?: Array - pages?: number - records?: Array - searchCount?: boolean - size?: number - total?: number -} + countId?: string; + current?: number; + maxLimit?: number; + optimizeCountSql?: boolean; + orders?: Array; + pages?: number; + records?: Array; + searchCount?: boolean; + size?: number; + total?: number; +}; + diff --git a/generated/models/ResourceFavourAddRequest.ts b/generated/models/ResourceFavourAddRequest.ts index c795b6a..25b2b69 100644 --- a/generated/models/ResourceFavourAddRequest.ts +++ b/generated/models/ResourceFavourAddRequest.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type ResourceFavourAddRequest = { - resourceId?: number - userId?: string -} + resourceId?: number; + userId?: string; +}; + diff --git a/generated/models/ResourceFavourQueryRequest.ts b/generated/models/ResourceFavourQueryRequest.ts index 4597db0..f7850d6 100644 --- a/generated/models/ResourceFavourQueryRequest.ts +++ b/generated/models/ResourceFavourQueryRequest.ts @@ -3,10 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type ResourceFavourQueryRequest = { - current?: number - pageSize?: number - sortField?: string - sortOrder?: string - type?: number - userId?: string -} + current?: number; + pageSize?: number; + sortField?: string; + sortOrder?: string; + type?: number; + userId?: string; +}; + diff --git a/generated/models/ResourceThumbAddRequest.ts b/generated/models/ResourceThumbAddRequest.ts index e2ba583..4032c79 100644 --- a/generated/models/ResourceThumbAddRequest.ts +++ b/generated/models/ResourceThumbAddRequest.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type ResourceThumbAddRequest = { - resourceId?: number - userId?: string -} + resourceId?: number; + userId?: string; +}; + diff --git a/generated/models/StudentCoursesDTO.ts b/generated/models/StudentCoursesDTO.ts index 6d05b11..0ae020b 100644 --- a/generated/models/StudentCoursesDTO.ts +++ b/generated/models/StudentCoursesDTO.ts @@ -6,7 +6,8 @@ * 学生课程 */ export type StudentCoursesDTO = { - course?: string - id?: string - student?: string -} + course?: string; + id?: string; + student?: string; +}; + diff --git a/generated/models/TeacherInfVO.ts b/generated/models/TeacherInfVO.ts index a26a695..6c47449 100644 --- a/generated/models/TeacherInfVO.ts +++ b/generated/models/TeacherInfVO.ts @@ -6,12 +6,13 @@ * 教师具体信息VO实体 */ export type TeacherInfVO = { - /** - * 教师name - */ - name?: string - /** - * 教师username - */ - username?: string -} + /** + * 教师name + */ + name?: string; + /** + * 教师username + */ + username?: string; +}; + diff --git a/generated/models/UmsAdmin.ts b/generated/models/UmsAdmin.ts index 34b4f30..04175c8 100644 --- a/generated/models/UmsAdmin.ts +++ b/generated/models/UmsAdmin.ts @@ -3,12 +3,13 @@ /* tslint:disable */ /* eslint-disable */ export type UmsAdmin = { - createTime?: string - icon?: string - id?: number - nickName?: string - password?: string - phone?: string - status?: number - username?: string -} + createTime?: string; + icon?: string; + id?: number; + nickName?: string; + password?: string; + phone?: string; + status?: number; + username?: string; +}; + diff --git a/generated/models/UmsAdminParam.ts b/generated/models/UmsAdminParam.ts index feef729..e4ce250 100644 --- a/generated/models/UmsAdminParam.ts +++ b/generated/models/UmsAdminParam.ts @@ -3,9 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type UmsAdminParam = { - icon?: string - nickName?: string - password?: string - phone?: string - username?: string -} + icon?: string; + nickName?: string; + password?: string; + phone?: string; + username?: string; +}; + diff --git a/generated/models/UmsStudentAndTeacherDTO.ts b/generated/models/UmsStudentAndTeacherDTO.ts index 82a6f7b..0a07f59 100644 --- a/generated/models/UmsStudentAndTeacherDTO.ts +++ b/generated/models/UmsStudentAndTeacherDTO.ts @@ -3,23 +3,24 @@ /* tslint:disable */ /* eslint-disable */ export type UmsStudentAndTeacherDTO = { - birthday?: string - className?: string - degree?: string - education?: string - emergencyContact?: string - faculty?: string - id?: number - joinWorkTime?: string - major?: string - name?: string - nationality?: string - number?: string - phone?: string - politicalStatus?: string - profession?: string - professionalTitle?: string - roleId?: number - sex?: string - yearAge?: string -} + birthday?: string; + className?: string; + degree?: string; + education?: string; + emergencyContact?: string; + faculty?: string; + id?: number; + joinWorkTime?: string; + major?: string; + name?: string; + nationality?: string; + number?: string; + phone?: string; + politicalStatus?: string; + profession?: string; + professionalTitle?: string; + roleId?: number; + sex?: string; + yearAge?: string; +}; + diff --git a/generated/models/UpdateAdminPasswordParam.ts b/generated/models/UpdateAdminPasswordParam.ts index d3feef4..d522494 100644 --- a/generated/models/UpdateAdminPasswordParam.ts +++ b/generated/models/UpdateAdminPasswordParam.ts @@ -3,16 +3,17 @@ /* tslint:disable */ /* eslint-disable */ export type UpdateAdminPasswordParam = { - /** - * 新密码 - */ - newPassword: string - /** - * 旧密码 - */ - oldPassword: string - /** - * 用户名 - */ - username: string -} + /** + * 新密码 + */ + newPassword: string; + /** + * 旧密码 + */ + oldPassword: string; + /** + * 用户名 + */ + username: string; +}; + diff --git a/generated/services/CourseResourceControllerService.ts b/generated/services/CourseResourceControllerService.ts index fdfdd11..ee146aa 100644 --- a/generated/services/CourseResourceControllerService.ts +++ b/generated/services/CourseResourceControllerService.ts @@ -2,97 +2,97 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_List_CourseResources_ } from '../models/BaseResponse_List_CourseResources_' -import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_' -import type { BaseResponse_string_ } from '../models/BaseResponse_string_' -import type { CourseResources } from '../models/CourseResources' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_List_CourseResources_ } from '../models/BaseResponse_List_CourseResources_'; +import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_'; +import type { BaseResponse_string_ } from '../models/BaseResponse_string_'; +import type { CourseResources } from '../models/CourseResources'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class CourseResourceControllerService { - /** - * All - * @returns BaseResponse_List_CourseResources_ OK - * @throws ApiError - */ - public static allUsingGet1(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/courses/all', - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * deleteRecords - * @param ids ids - * @returns BaseResponse_string_ OK - * @throws ApiError - */ - public static deleteRecordsUsingDelete1( - ids: Array, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/courses/delete', - query: { - ids: ids, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - }, - }) - } - /** - * getAll - * @param pagenum pagenum - * @param pagesize pagesize - * @param type type - * @returns BaseResponse_Page_ OK - * @throws ApiError - */ - public static getAllUsingGet1( - pagenum: number = 1, - pagesize: number = 10, - type?: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/courses/getall', - query: { - pagenum: pagenum, - pagesize: pagesize, - type: type, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * saveCourseResource - * @param courseResources courseResources - * @returns BaseResponse_string_ OK - * @throws ApiError - */ - public static saveCourseResourceUsingGet1( - courseResources: CourseResources, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/courses/save', - body: courseResources, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * All + * @returns BaseResponse_List_CourseResources_ OK + * @throws ApiError + */ + public static allUsingGet1(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/courses/all', + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * deleteRecords + * @param ids ids + * @returns BaseResponse_string_ OK + * @throws ApiError + */ + public static deleteRecordsUsingDelete1( + ids: Array, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/courses/delete', + query: { + 'ids': ids, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + }, + }); + } + /** + * getAll + * @param pagenum pagenum + * @param pagesize pagesize + * @param type type + * @returns BaseResponse_Page_ OK + * @throws ApiError + */ + public static getAllUsingGet1( + pagenum: number = 1, + pagesize: number = 10, + type?: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/courses/getall', + query: { + 'pagenum': pagenum, + 'pagesize': pagesize, + 'type': type, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * saveCourseResource + * @param courseResources courseResources + * @returns BaseResponse_string_ OK + * @throws ApiError + */ + public static saveCourseResourceUsingGet1( + courseResources: CourseResources, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/courses/save', + body: courseResources, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/FavourInformationControllerService.ts b/generated/services/FavourInformationControllerService.ts index b6cb27e..deb7017 100644 --- a/generated/services/FavourInformationControllerService.ts +++ b/generated/services/FavourInformationControllerService.ts @@ -2,46 +2,46 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class FavourInformationControllerService { - /** - * getInformation2 - * @param resourceIdList resourceIdList - * @param type type - * @param current - * @param pageSize - * @param sortField - * @param sortOrder - * @returns BaseResponse_Page_CourseResources_ OK - * @throws ApiError - */ - public static getInformation2UsingGet1( - resourceIdList: Array, - type: number, - current?: number, - pageSize?: number, - sortField?: string, - sortOrder?: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/Favour/get', - query: { - current: current, - pageSize: pageSize, - sortField: sortField, - sortOrder: sortOrder, - resourceIdList: resourceIdList, - type: type, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * getInformation2 + * @param resourceIdList resourceIdList + * @param type type + * @param current + * @param pageSize + * @param sortField + * @param sortOrder + * @returns BaseResponse_Page_CourseResources_ OK + * @throws ApiError + */ + public static getInformation2UsingGet1( + resourceIdList: Array, + type: number, + current?: number, + pageSize?: number, + sortField?: string, + sortOrder?: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/Favour/get', + query: { + 'current': current, + 'pageSize': pageSize, + 'sortField': sortField, + 'sortOrder': sortOrder, + 'resourceIdList': resourceIdList, + 'type': type, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/KnowControllerService.ts b/generated/services/KnowControllerService.ts new file mode 100644 index 0000000..cd7177c --- /dev/null +++ b/generated/services/KnowControllerService.ts @@ -0,0 +1,97 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Know } from '../models/Know'; +import type { KnowQueryRequest } from '../models/KnowQueryRequest'; +import type { KnowRequest } from '../models/KnowRequest'; +import type { KnowupdateRequest } from '../models/KnowupdateRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class KnowControllerService { + /** + * add + * @param knowAddRequest knowAddRequest + * @returns boolean OK + * @returns any Created + * @throws ApiError + */ + public static addUsingPost1( + knowAddRequest: KnowRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/know/add', + body: knowAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * deleteKnow + * @param ids ids + * @returns number OK + * @returns any Created + * @throws ApiError + */ + public static deleteKnowUsingPost1( + ids: Array, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/know/delete', + body: ids, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * query + * @param knowQueryRequest knowQueryRequest + * @returns Know OK + * @returns any Created + * @throws ApiError + */ + public static queryUsingPost1( + knowQueryRequest: KnowQueryRequest, + ): CancelablePromise | any> { + return __request(OpenAPI, { + method: 'POST', + url: '/api/know/query', + body: knowQueryRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * update + * @param knowAddRequest knowAddRequest + * @returns boolean OK + * @returns any Created + * @throws ApiError + */ + public static updateUsingPost1( + knowAddRequest: KnowupdateRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/know/update', + body: knowAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } +} diff --git a/generated/services/LearningRecordsControllerService.ts b/generated/services/LearningRecordsControllerService.ts index d6bfc61..71fd933 100644 --- a/generated/services/LearningRecordsControllerService.ts +++ b/generated/services/LearningRecordsControllerService.ts @@ -2,98 +2,98 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_List_LearningRecords_ } from '../models/BaseResponse_List_LearningRecords_' -import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_' -import type { BaseResponse_string_ } from '../models/BaseResponse_string_' -import type { LearningRecords } from '../models/LearningRecords' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_List_LearningRecords_ } from '../models/BaseResponse_List_LearningRecords_'; +import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_'; +import type { BaseResponse_string_ } from '../models/BaseResponse_string_'; +import type { LearningRecords } from '../models/LearningRecords'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class LearningRecordsControllerService { - /** - * All - * @returns BaseResponse_List_LearningRecords_ OK - * @throws ApiError - */ - public static allUsingGet3(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/learningrecords/all', - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * deleteRecords - * @param ids ids - * @returns BaseResponse_string_ OK - * @throws ApiError - */ - public static deleteRecordsUsingDelete3( - ids: Array, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/learningrecords/delete', - query: { - ids: ids, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - }, - }) - } - /** - * getAll - * @param userId userId - * @param pagenum pagenum - * @param pagesize pagesize - * @returns BaseResponse_Page_ OK - * @throws ApiError - */ - public static getAllUsingGet3( - userId: string, - pagenum: number = 1, - pagesize: number = 10, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/learningrecords/getall', - query: { - pagenum: pagenum, - pagesize: pagesize, - userId: userId, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * saveRecords - * @param learningRecords learningRecords - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static saveRecordsUsingPost1( - learningRecords: LearningRecords, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/learningrecords/saverecords', - body: learningRecords, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * All + * @returns BaseResponse_List_LearningRecords_ OK + * @throws ApiError + */ + public static allUsingGet3(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/learningrecords/all', + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * deleteRecords + * @param ids ids + * @returns BaseResponse_string_ OK + * @throws ApiError + */ + public static deleteRecordsUsingDelete3( + ids: Array, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/learningrecords/delete', + query: { + 'ids': ids, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + }, + }); + } + /** + * getAll + * @param userId userId + * @param pagenum pagenum + * @param pagesize pagesize + * @returns BaseResponse_Page_ OK + * @throws ApiError + */ + public static getAllUsingGet3( + userId: string, + pagenum: number = 1, + pagesize: number = 10, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/learningrecords/getall', + query: { + 'pagenum': pagenum, + 'pagesize': pagesize, + 'userId': userId, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * saveRecords + * @param learningRecords learningRecords + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static saveRecordsUsingPost1( + learningRecords: LearningRecords, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/learningrecords/saverecords', + body: learningRecords, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/ResourceControllerService.ts b/generated/services/ResourceControllerService.ts index cc358a3..a543921 100644 --- a/generated/services/ResourceControllerService.ts +++ b/generated/services/ResourceControllerService.ts @@ -2,57 +2,57 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_string_ } from '../models/BaseResponse_string_' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_string_ } from '../models/BaseResponse_string_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class ResourceControllerService { - /** - * download - * @param id Id - * @param path path - * @returns BaseResponse_string_ OK - * @throws ApiError - */ - public static downloadUsingGet1( - id: string, - path: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/download', - query: { - Id: id, - path: path, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * upload - * @param file file - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static uploadUsingPost1( - file?: Blob, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/upload', - formData: { - file: file, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * download + * @param id Id + * @param path path + * @returns BaseResponse_string_ OK + * @throws ApiError + */ + public static downloadUsingGet1( + id: string, + path: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/download', + query: { + 'Id': id, + 'path': path, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * upload + * @param file file + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static uploadUsingPost1( + file?: Blob, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/upload', + formData: { + 'file': file, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/SeCourseFavourControllerService.ts b/generated/services/SeCourseFavourControllerService.ts index eb20c82..537fe36 100644 --- a/generated/services/SeCourseFavourControllerService.ts +++ b/generated/services/SeCourseFavourControllerService.ts @@ -2,98 +2,98 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_' -import type { BaseResponse_long_ } from '../models/BaseResponse_long_' -import type { BaseResponse_Page_CourseFavourDetailVO_ } from '../models/BaseResponse_Page_CourseFavourDetailVO_' -import type { CourseFavourAddRequest } from '../models/CourseFavourAddRequest' -import type { CourseFavourAllRequest } from '../models/CourseFavourAllRequest' -import type { CourseFavourQueryRequest } from '../models/CourseFavourQueryRequest' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'; +import type { BaseResponse_long_ } from '../models/BaseResponse_long_'; +import type { BaseResponse_Page_CourseFavourDetailVO_ } from '../models/BaseResponse_Page_CourseFavourDetailVO_'; +import type { CourseFavourAddRequest } from '../models/CourseFavourAddRequest'; +import type { CourseFavourAllRequest } from '../models/CourseFavourAllRequest'; +import type { CourseFavourQueryRequest } from '../models/CourseFavourQueryRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SeCourseFavourControllerService { - /** - * doFavour - * @param courseFavourAddRequest courseFavourAddRequest - * @returns BaseResponse_boolean_ OK - * @returns any Created - * @throws ApiError - */ - public static doFavourUsingPost1( - courseFavourAddRequest: CourseFavourAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/course_favour/add', - body: courseFavourAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * favourCount - * @param courseFavourAddRequest courseFavourAddRequest - * @returns BaseResponse_long_ OK - * @returns any Created - * @throws ApiError - */ - public static favourCountUsingPost1( - courseFavourAddRequest: CourseFavourAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/course_favour/count', - body: courseFavourAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * courseCount - * @param courseFavourAllRequest courseFavourAllRequest - * @returns BaseResponse_long_ OK - * @returns any Created - * @throws ApiError - */ - public static courseCountUsingPost1( - courseFavourAllRequest: CourseFavourAllRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/course_favour/countAll', - body: courseFavourAllRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * listPostByPage - * @param courseFavourQueryRequest courseFavourQueryRequest - * @returns BaseResponse_Page_CourseFavourDetailVO_ OK - * @returns any Created - * @throws ApiError - */ - public static listPostByPageUsingPost1( - courseFavourQueryRequest: CourseFavourQueryRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/course_favour/list/page', - body: courseFavourQueryRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * doFavour + * @param courseFavourAddRequest courseFavourAddRequest + * @returns BaseResponse_boolean_ OK + * @returns any Created + * @throws ApiError + */ + public static doFavourUsingPost1( + courseFavourAddRequest: CourseFavourAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/course_favour/add', + body: courseFavourAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * favourCount + * @param courseFavourAddRequest courseFavourAddRequest + * @returns BaseResponse_long_ OK + * @returns any Created + * @throws ApiError + */ + public static favourCountUsingPost1( + courseFavourAddRequest: CourseFavourAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/course_favour/count', + body: courseFavourAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * courseCount + * @param courseFavourAllRequest courseFavourAllRequest + * @returns BaseResponse_long_ OK + * @returns any Created + * @throws ApiError + */ + public static courseCountUsingPost1( + courseFavourAllRequest: CourseFavourAllRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/course_favour/countAll', + body: courseFavourAllRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * listPostByPage + * @param courseFavourQueryRequest courseFavourQueryRequest + * @returns BaseResponse_Page_CourseFavourDetailVO_ OK + * @returns any Created + * @throws ApiError + */ + public static listPostByPageUsingPost1( + courseFavourQueryRequest: CourseFavourQueryRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/course_favour/list/page', + body: courseFavourQueryRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/SeCourseThumbControllerService.ts b/generated/services/SeCourseThumbControllerService.ts index 29787d4..c3fd6b7 100644 --- a/generated/services/SeCourseThumbControllerService.ts +++ b/generated/services/SeCourseThumbControllerService.ts @@ -2,53 +2,53 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_' -import type { BaseResponse_long_ } from '../models/BaseResponse_long_' -import type { CourseThumbAddRequest } from '../models/CourseThumbAddRequest' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'; +import type { BaseResponse_long_ } from '../models/BaseResponse_long_'; +import type { CourseThumbAddRequest } from '../models/CourseThumbAddRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SeCourseThumbControllerService { - /** - * doThumb - * @param courseThumbAddRequest courseThumbAddRequest - * @returns BaseResponse_boolean_ OK - * @returns any Created - * @throws ApiError - */ - public static doThumbUsingPost1( - courseThumbAddRequest: CourseThumbAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/course_thumb/', - body: courseThumbAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * thumbCount - * @param courseThumbAddRequest courseThumbAddRequest - * @returns BaseResponse_long_ OK - * @returns any Created - * @throws ApiError - */ - public static thumbCountUsingPost1( - courseThumbAddRequest: CourseThumbAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/course_thumb/count', - body: courseThumbAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * doThumb + * @param courseThumbAddRequest courseThumbAddRequest + * @returns BaseResponse_boolean_ OK + * @returns any Created + * @throws ApiError + */ + public static doThumbUsingPost1( + courseThumbAddRequest: CourseThumbAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/course_thumb/', + body: courseThumbAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * thumbCount + * @param courseThumbAddRequest courseThumbAddRequest + * @returns BaseResponse_long_ OK + * @returns any Created + * @throws ApiError + */ + public static thumbCountUsingPost1( + courseThumbAddRequest: CourseThumbAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/course_thumb/count', + body: courseThumbAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/SeKnowFavourControllerService.ts b/generated/services/SeKnowFavourControllerService.ts index e86efa9..d6c8df1 100644 --- a/generated/services/SeKnowFavourControllerService.ts +++ b/generated/services/SeKnowFavourControllerService.ts @@ -2,31 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_' -import type { KnowFavourAddRequest } from '../models/KnowFavourAddRequest' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'; +import type { KnowFavourAddRequest } from '../models/KnowFavourAddRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SeKnowFavourControllerService { - /** - * doFavour - * @param knowFavourAddRequest knowFavourAddRequest - * @returns BaseResponse_boolean_ OK - * @returns any Created - * @throws ApiError - */ - public static doFavourUsingPost3( - knowFavourAddRequest: KnowFavourAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/know_favour/add', - body: knowFavourAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * doFavour + * @param knowFavourAddRequest knowFavourAddRequest + * @returns BaseResponse_boolean_ OK + * @returns any Created + * @throws ApiError + */ + public static doFavourUsingPost3( + knowFavourAddRequest: KnowFavourAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/know_favour/add', + body: knowFavourAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/SeKnowThumbControllerService.ts b/generated/services/SeKnowThumbControllerService.ts index 2b4d9c1..c8d1246 100644 --- a/generated/services/SeKnowThumbControllerService.ts +++ b/generated/services/SeKnowThumbControllerService.ts @@ -2,31 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_' -import type { KnowThumbAddRequest } from '../models/KnowThumbAddRequest' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'; +import type { KnowThumbAddRequest } from '../models/KnowThumbAddRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SeKnowThumbControllerService { - /** - * doThumb - * @param knowThumbAddRequest knowThumbAddRequest - * @returns BaseResponse_boolean_ OK - * @returns any Created - * @throws ApiError - */ - public static doThumbUsingPost3( - knowThumbAddRequest: KnowThumbAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/know_thumb/add', - body: knowThumbAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * doThumb + * @param knowThumbAddRequest knowThumbAddRequest + * @returns BaseResponse_boolean_ OK + * @returns any Created + * @throws ApiError + */ + public static doThumbUsingPost3( + knowThumbAddRequest: KnowThumbAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/know_thumb/add', + body: knowThumbAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/SeResourceFavourControllerService.ts b/generated/services/SeResourceFavourControllerService.ts index 2c81fa9..5933977 100644 --- a/generated/services/SeResourceFavourControllerService.ts +++ b/generated/services/SeResourceFavourControllerService.ts @@ -2,54 +2,54 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_' -import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_' -import type { ResourceFavourAddRequest } from '../models/ResourceFavourAddRequest' -import type { ResourceFavourQueryRequest } from '../models/ResourceFavourQueryRequest' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'; +import type { BaseResponse_Page_CourseResources_ } from '../models/BaseResponse_Page_CourseResources_'; +import type { ResourceFavourAddRequest } from '../models/ResourceFavourAddRequest'; +import type { ResourceFavourQueryRequest } from '../models/ResourceFavourQueryRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SeResourceFavourControllerService { - /** - * doFavour - * @param resourceFavourAddRequest resourceFavourAddRequest - * @returns BaseResponse_boolean_ OK - * @returns any Created - * @throws ApiError - */ - public static doFavourUsingPost5( - resourceFavourAddRequest: ResourceFavourAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/resource_favour/add', - body: resourceFavourAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * listPostByPage - * @param resourceFavourQueryRequest resourceFavourQueryRequest - * @returns BaseResponse_Page_CourseResources_ OK - * @returns any Created - * @throws ApiError - */ - public static listPostByPageUsingPost3( - resourceFavourQueryRequest: ResourceFavourQueryRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/resource_favour/list/page', - body: resourceFavourQueryRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * doFavour + * @param resourceFavourAddRequest resourceFavourAddRequest + * @returns BaseResponse_boolean_ OK + * @returns any Created + * @throws ApiError + */ + public static doFavourUsingPost5( + resourceFavourAddRequest: ResourceFavourAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/resource_favour/add', + body: resourceFavourAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * listPostByPage + * @param resourceFavourQueryRequest resourceFavourQueryRequest + * @returns BaseResponse_Page_CourseResources_ OK + * @returns any Created + * @throws ApiError + */ + public static listPostByPageUsingPost3( + resourceFavourQueryRequest: ResourceFavourQueryRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/resource_favour/list/page', + body: resourceFavourQueryRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/SeResourceThumbControllerService.ts b/generated/services/SeResourceThumbControllerService.ts index 6d1a5cb..28b95c8 100644 --- a/generated/services/SeResourceThumbControllerService.ts +++ b/generated/services/SeResourceThumbControllerService.ts @@ -2,31 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_' -import type { ResourceThumbAddRequest } from '../models/ResourceThumbAddRequest' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_boolean_ } from '../models/BaseResponse_boolean_'; +import type { ResourceThumbAddRequest } from '../models/ResourceThumbAddRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SeResourceThumbControllerService { - /** - * doThumb - * @param resourceThumbAddRequest resourceThumbAddRequest - * @returns BaseResponse_boolean_ OK - * @returns any Created - * @throws ApiError - */ - public static doThumbUsingPost5( - resourceThumbAddRequest: ResourceThumbAddRequest, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/resource_thumb/add', - body: resourceThumbAddRequest, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * doThumb + * @param resourceThumbAddRequest resourceThumbAddRequest + * @returns BaseResponse_boolean_ OK + * @returns any Created + * @throws ApiError + */ + public static doThumbUsingPost5( + resourceThumbAddRequest: ResourceThumbAddRequest, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/resource_thumb/add', + body: resourceThumbAddRequest, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/Service.ts b/generated/services/Service.ts index a9bd9f5..aecfdfa 100644 --- a/generated/services/Service.ts +++ b/generated/services/Service.ts @@ -2,511 +2,511 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse } from '../models/BaseResponse' -import type { BaseResponse_CoursesDTO_ } from '../models/BaseResponse_CoursesDTO_' -import type { BaseResponse_List_CourseObjectivesTreeVO_ } from '../models/BaseResponse_List_CourseObjectivesTreeVO_' -import type { BaseResponse_List_ObjectivesType_ } from '../models/BaseResponse_List_ObjectivesType_' -import type { BaseResponse_Map_string_object_ } from '../models/BaseResponse_Map_string_object_' -import type { BaseResponse_ObjectiveContentKnowVO_ } from '../models/BaseResponse_ObjectiveContentKnowVO_' -import type { BaseResponse_ObjectiveContents_ } from '../models/BaseResponse_ObjectiveContents_' -import type { BaseResponse_PageDTO_CoursesVO_ } from '../models/BaseResponse_PageDTO_CoursesVO_' -import type { BaseResponse_string_ } from '../models/BaseResponse_string_' -import type { CourseObjectivesDTO } from '../models/CourseObjectivesDTO' -import type { CoursesDTO } from '../models/CoursesDTO' -import type { ObjectiveContentKnowDTO } from '../models/ObjectiveContentKnowDTO' -import type { ObjectiveContents_ } from '../models/ObjectiveContents_' -import type { ObjectivesType_ } from '../models/ObjectivesType_' -import type { StudentCoursesDTO } from '../models/StudentCoursesDTO' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse } from '../models/BaseResponse'; +import type { BaseResponse_CoursesDTO_ } from '../models/BaseResponse_CoursesDTO_'; +import type { BaseResponse_List_CourseObjectivesTreeVO_ } from '../models/BaseResponse_List_CourseObjectivesTreeVO_'; +import type { BaseResponse_List_ObjectivesType_ } from '../models/BaseResponse_List_ObjectivesType_'; +import type { BaseResponse_Map_string_object_ } from '../models/BaseResponse_Map_string_object_'; +import type { BaseResponse_ObjectiveContentKnowVO_ } from '../models/BaseResponse_ObjectiveContentKnowVO_'; +import type { BaseResponse_ObjectiveContents_ } from '../models/BaseResponse_ObjectiveContents_'; +import type { BaseResponse_PageDTO_CoursesVO_ } from '../models/BaseResponse_PageDTO_CoursesVO_'; +import type { BaseResponse_string_ } from '../models/BaseResponse_string_'; +import type { CourseObjectivesDTO } from '../models/CourseObjectivesDTO'; +import type { CoursesDTO } from '../models/CoursesDTO'; +import type { ObjectiveContentKnowDTO } from '../models/ObjectiveContentKnowDTO'; +import type { ObjectiveContents_ } from '../models/ObjectiveContents_'; +import type { ObjectivesType_ } from '../models/ObjectivesType_'; +import type { StudentCoursesDTO } from '../models/StudentCoursesDTO'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class Service { - /** - * 编辑分项目标 - * @param courseObjectivesDto courseObjectivesDTO - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static updateCourseObjectivesUsingPut1( - courseObjectivesDto: CourseObjectivesDTO, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/course_objectives', - body: courseObjectivesDto, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 新增分项目标-默认第一个必须添加思政目标 - * @param courseObjectivesDto courseObjectivesDTO - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static saveCourseObjectivesUsingPost1( - courseObjectivesDto: CourseObjectivesDTO, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/course_objectives/addobjectives', - body: courseObjectivesDto, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 查询课程目标内容 - * @param id id - * @returns BaseResponse_List_CourseObjectivesTreeVO_ OK - * @throws ApiError - */ - public static queryCourseObjectivesTreeUsingGet1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/course_objectives/list/{id}', - path: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 删除分项目标-只能最后一个删除思政目标-总目标只需删除关联的内容 - * @param id id - * @returns BaseResponse_string_ OK - * @throws ApiError - */ - public static deleteCourseObjectivesByIdsUsingDelete1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/course_objectives/{id}', - path: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - }, - }) - } - /** - * 根据id修改课程 - * @param coursesDto coursesDTO - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static editCourseUsingPut1( - coursesDto: CoursesDTO, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/coursesteacher', - body: coursesDto, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 新增课程--同步新增课程的总体目标并同时添加所有的分项目标 - * @param coursesDto coursesDTO - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static saveCourseUsingPost1( - coursesDto: CoursesDTO, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/coursesteacher/addcourse', - body: coursesDto, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 导出word - * @returns any OK - * @throws ApiError - */ - public static testUsingGet1(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/coursesteacher/down', - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 网站首页 - * @param page page - * @param pageSize pageSize - * @returns BaseResponse_Map_string_object_ OK - * @throws ApiError - */ - public static getDataUsingGet1( - page: number, - pageSize: number, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/coursesteacher/index', - query: { - page: page, - pageSize: pageSize, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 查询课程列表 - * @param username 用户的username - * @param assessmenttype 课程考核类型 - * @param category 课程类别 - * @param isAsc 是否升序 - * @param name 课程名称关键字 - * @param nature 课程性质 - * @param pageNo 页码 - * @param pageSize 每页数量 - * @param sortBy 排序字段 - * @param teacher 课程任课教师 - * @returns BaseResponse_PageDTO_CoursesVO_ OK - * @throws ApiError - */ - public static getCoursesUsingGet1( - username: string, - assessmenttype?: string, - category?: string, - isAsc?: boolean, - name?: string, - nature?: string, - pageNo?: number, - pageSize?: number, - sortBy?: string, - teacher?: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/coursesteacher/page', - query: { - assessmenttype: assessmenttype, - category: category, - isAsc: isAsc, - name: name, - nature: nature, - pageNo: pageNo, - pageSize: pageSize, - sortBy: sortBy, - teacher: teacher, - username: username, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 根据id查询课程 - * @param id id - * @returns BaseResponse_CoursesDTO_ OK - * @throws ApiError - */ - public static getByIdCourseUsingGet1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/coursesteacher/{id}', - path: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 根据id删除课程 - * @param id id - * @returns BaseResponse OK - * @throws ApiError - */ - public static deleteCoursesUsingDelete1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/coursesteacher/{id}', - path: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - }, - }) - } - /** - * 给分项目标或者是内容添加知识点 - * @param objectiveContentKnowDto objectiveContentKnowDTO - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static saveKnowsWithObjectiveOrContentUsingPost1( - objectiveContentKnowDto: ObjectiveContentKnowDTO, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/objective_content_know/addknows', - body: objectiveContentKnowDto, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 针对分项目标统计,支撑分项目标知识点的个数、学时合计、占比 - * @param objectiveId objectiveId - * @returns BaseResponse_ObjectiveContentKnowVO_ OK - * @throws ApiError - */ - public static getCountDataUsingGet1( - objectiveId: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/objective_content_know/{objectiveId}', - path: { - objectiveId: objectiveId, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 添加目标内容 - * @param objectiveContents objectiveContents - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static saveContentUsingPost1( - objectiveContents: ObjectiveContents_, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/objective_contents/addcontent', - body: objectiveContents, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 修改目标内容 - * @param objectiveContents objectiveContents - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static updateContentUsingPut1( - objectiveContents: ObjectiveContents_, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/objective_contents/update', - body: objectiveContents, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 根据id查询目标内容 - * @param id id - * @returns BaseResponse_ObjectiveContents_ OK - * @throws ApiError - */ - public static updateContentUsingGet1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/objective_contents/{id}', - path: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 删除目标内容 - * @param id id - * @returns BaseResponse_string_ OK - * @throws ApiError - */ - public static deleteContentUsingDelete1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/objective_contents/{id}', - path: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - }, - }) - } - /** - * 修改目标类型 - * @param objectivesType objectivesType - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static updateObjectivesUsingPut1( - objectivesType: ObjectivesType_, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/objectives_type', - body: objectivesType, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 新增目标类型 - * @param objectivesType objectivesType - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static saveObjectivesUsingPost1( - objectivesType: ObjectivesType_, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/objectives_type/addobjectives', - body: objectivesType, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 删除目标类型 - * @param id id - * @returns BaseResponse_string_ OK - * @throws ApiError - */ - public static deleteObjectivesUsingDelete1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/objectives_type/deleteobjectives/{id}', - path: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - }, - }) - } - /** - * 列表显示目标类型 - * @returns BaseResponse_List_ObjectivesType_ OK - * @throws ApiError - */ - public static objectivesListUsingGet1(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/objectives_type/list', - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 给学生添加课程 - * @param studentCoursesDto studentCoursesDTO - * @returns BaseResponse_string_ OK - * @returns any Created - * @throws ApiError - */ - public static saveCoursesToStudentsUsingPost1( - studentCoursesDto: StudentCoursesDTO, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/student_courses/addcoursess', - body: studentCoursesDto, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * 编辑分项目标 + * @param courseObjectivesDto courseObjectivesDTO + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static updateCourseObjectivesUsingPut1( + courseObjectivesDto: CourseObjectivesDTO, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/course_objectives', + body: courseObjectivesDto, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 新增分项目标-默认第一个必须添加思政目标 + * @param courseObjectivesDto courseObjectivesDTO + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static saveCourseObjectivesUsingPost1( + courseObjectivesDto: CourseObjectivesDTO, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/course_objectives/addobjectives', + body: courseObjectivesDto, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 查询课程目标内容 + * @param id id + * @returns BaseResponse_List_CourseObjectivesTreeVO_ OK + * @throws ApiError + */ + public static queryCourseObjectivesTreeUsingGet1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/course_objectives/list/{id}', + path: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 删除分项目标-只能最后一个删除思政目标-总目标只需删除关联的内容 + * @param id id + * @returns BaseResponse_string_ OK + * @throws ApiError + */ + public static deleteCourseObjectivesByIdsUsingDelete1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/course_objectives/{id}', + path: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + }, + }); + } + /** + * 根据id修改课程 + * @param coursesDto coursesDTO + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static editCourseUsingPut1( + coursesDto: CoursesDTO, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/coursesteacher', + body: coursesDto, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 新增课程--同步新增课程的总体目标并同时添加所有的分项目标 + * @param coursesDto coursesDTO + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static saveCourseUsingPost1( + coursesDto: CoursesDTO, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/coursesteacher/addcourse', + body: coursesDto, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 导出word + * @returns any OK + * @throws ApiError + */ + public static testUsingGet1(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/coursesteacher/down', + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 网站首页 + * @param page page + * @param pageSize pageSize + * @returns BaseResponse_Map_string_object_ OK + * @throws ApiError + */ + public static getDataUsingGet1( + page: number, + pageSize: number, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/coursesteacher/index', + query: { + 'page': page, + 'pageSize': pageSize, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 查询课程列表 + * @param username 用户的username + * @param assessmenttype 课程考核类型 + * @param category 课程类别 + * @param isAsc 是否升序 + * @param name 课程名称关键字 + * @param nature 课程性质 + * @param pageNo 页码 + * @param pageSize 每页数量 + * @param sortBy 排序字段 + * @param teacher 课程任课教师 + * @returns BaseResponse_PageDTO_CoursesVO_ OK + * @throws ApiError + */ + public static getCoursesUsingGet1( + username: string, + assessmenttype?: string, + category?: string, + isAsc?: boolean, + name?: string, + nature?: string, + pageNo?: number, + pageSize?: number, + sortBy?: string, + teacher?: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/coursesteacher/page', + query: { + 'assessmenttype': assessmenttype, + 'category': category, + 'isAsc': isAsc, + 'name': name, + 'nature': nature, + 'pageNo': pageNo, + 'pageSize': pageSize, + 'sortBy': sortBy, + 'teacher': teacher, + 'username': username, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 根据id查询课程 + * @param id id + * @returns BaseResponse_CoursesDTO_ OK + * @throws ApiError + */ + public static getByIdCourseUsingGet1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/coursesteacher/{id}', + path: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 根据id删除课程 + * @param id id + * @returns BaseResponse OK + * @throws ApiError + */ + public static deleteCoursesUsingDelete1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/coursesteacher/{id}', + path: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + }, + }); + } + /** + * 给分项目标或者是内容添加知识点 + * @param objectiveContentKnowDto objectiveContentKnowDTO + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static saveKnowsWithObjectiveOrContentUsingPost1( + objectiveContentKnowDto: ObjectiveContentKnowDTO, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/objective_content_know/addknows', + body: objectiveContentKnowDto, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 针对分项目标统计,支撑分项目标知识点的个数、学时合计、占比 + * @param objectiveId objectiveId + * @returns BaseResponse_ObjectiveContentKnowVO_ OK + * @throws ApiError + */ + public static getCountDataUsingGet1( + objectiveId: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/objective_content_know/{objectiveId}', + path: { + 'objectiveId': objectiveId, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 添加目标内容 + * @param objectiveContents objectiveContents + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static saveContentUsingPost1( + objectiveContents: ObjectiveContents_, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/objective_contents/addcontent', + body: objectiveContents, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 修改目标内容 + * @param objectiveContents objectiveContents + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static updateContentUsingPut1( + objectiveContents: ObjectiveContents_, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/objective_contents/update', + body: objectiveContents, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 根据id查询目标内容 + * @param id id + * @returns BaseResponse_ObjectiveContents_ OK + * @throws ApiError + */ + public static updateContentUsingGet1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/objective_contents/{id}', + path: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 删除目标内容 + * @param id id + * @returns BaseResponse_string_ OK + * @throws ApiError + */ + public static deleteContentUsingDelete1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/objective_contents/{id}', + path: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + }, + }); + } + /** + * 修改目标类型 + * @param objectivesType objectivesType + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static updateObjectivesUsingPut1( + objectivesType: ObjectivesType_, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/objectives_type', + body: objectivesType, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 新增目标类型 + * @param objectivesType objectivesType + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static saveObjectivesUsingPost1( + objectivesType: ObjectivesType_, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/objectives_type/addobjectives', + body: objectivesType, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 删除目标类型 + * @param id id + * @returns BaseResponse_string_ OK + * @throws ApiError + */ + public static deleteObjectivesUsingDelete1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/objectives_type/deleteobjectives/{id}', + path: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + }, + }); + } + /** + * 列表显示目标类型 + * @returns BaseResponse_List_ObjectivesType_ OK + * @throws ApiError + */ + public static objectivesListUsingGet1(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/objectives_type/list', + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 给学生添加课程 + * @param studentCoursesDto studentCoursesDTO + * @returns BaseResponse_string_ OK + * @returns any Created + * @throws ApiError + */ + public static saveCoursesToStudentsUsingPost1( + studentCoursesDto: StudentCoursesDTO, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/student_courses/addcoursess', + body: studentCoursesDto, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/generated/services/UmsAdminControllerService.ts b/generated/services/UmsAdminControllerService.ts index f1b4900..7c2df09 100644 --- a/generated/services/UmsAdminControllerService.ts +++ b/generated/services/UmsAdminControllerService.ts @@ -2,265 +2,265 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseResponse_List_TeacherInfVO_ } from '../models/BaseResponse_List_TeacherInfVO_' -import type { CommonResult } from '../models/CommonResult' -import type { CommonResult_string_ } from '../models/CommonResult_string_' -import type { CommonResult_UmsAdmin_ } from '../models/CommonResult_UmsAdmin_' -import type { UmsAdmin } from '../models/UmsAdmin' -import type { UmsAdminParam } from '../models/UmsAdminParam' -import type { UmsStudentAndTeacherDTO } from '../models/UmsStudentAndTeacherDTO' -import type { UpdateAdminPasswordParam } from '../models/UpdateAdminPasswordParam' -import type { CancelablePromise } from '../core/CancelablePromise' -import { OpenAPI } from '../core/OpenAPI' -import { request as __request } from '../core/request' +import type { BaseResponse_List_TeacherInfVO_ } from '../models/BaseResponse_List_TeacherInfVO_'; +import type { CommonResult } from '../models/CommonResult'; +import type { CommonResult_string_ } from '../models/CommonResult_string_'; +import type { CommonResult_UmsAdmin_ } from '../models/CommonResult_UmsAdmin_'; +import type { UmsAdmin } from '../models/UmsAdmin'; +import type { UmsAdminParam } from '../models/UmsAdminParam'; +import type { UmsStudentAndTeacherDTO } from '../models/UmsStudentAndTeacherDTO'; +import type { UpdateAdminPasswordParam } from '../models/UpdateAdminPasswordParam'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class UmsAdminControllerService { - /** - * 发送短信返回验证码 - * @param phone phone - * @returns CommonResult_string_ OK - * @returns any Created - * @throws ApiError - */ - public static sendVerifyCodeUsingPost1( - phone: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/code', - query: { - phone: phone, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 获取教师信息列表,关联教师的username和name - * @returns BaseResponse_List_TeacherInfVO_ OK - * @throws ApiError - */ - public static getTeacherInfListUsingGet1(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/user/get_teacherinf_list', - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 获取当前登录用户信息 - * @param name - * @returns CommonResult OK - * @throws ApiError - */ - public static getAdminInfoUsingGet1( - name?: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/user/info', - query: { - name: name, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 用户名登录以后返回token - * @param umsAdmin umsAdmin - * @returns CommonResult OK - * @returns any Created - * @throws ApiError - */ - public static loginUsingPost1( - umsAdmin: UmsAdmin, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/login', - body: umsAdmin, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 获取指定个人信息 - * @param id id - * @returns CommonResult OK - * @returns any Created - * @throws ApiError - */ - public static getByIdPersonalInfoUsingPost1( - id: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/personal/info', - query: { - id: id, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 手机号登录以后返回token - * @param phone phone - * @returns CommonResult OK - * @returns any Created - * @throws ApiError - */ - public static phoneLoginUsingPost1( - phone: string, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/phone/login', - query: { - phone: phone, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 手机号注册 - * @param umsAdminParam umsAdminParam - * @returns CommonResult_UmsAdmin_ OK - * @returns any Created - * @throws ApiError - */ - public static phoneRegisterUsingPost1( - umsAdminParam: UmsAdminParam, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/phone/register', - body: umsAdminParam, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 刷新token - * @returns CommonResult OK - * @throws ApiError - */ - public static refreshTokenUsingGet1(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/user/refreshToken', - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 用户注册 - * @param umsAdminParam umsAdminParam - * @returns CommonResult_UmsAdmin_ OK - * @returns any Created - * @throws ApiError - */ - public static registerUsingPost1( - umsAdminParam: UmsAdminParam, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/register', - body: umsAdminParam, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 修改指定用户信息 - * @param umsadmin umsadmin - * @returns CommonResult OK - * @returns any Created - * @throws ApiError - */ - public static updateUmsUsingPost1( - umsadmin: UmsAdmin, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/update', - body: umsadmin, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 修改指定个人信息 - * @param umsStudentAndTeacherDto umsStudentAndTeacherDTO - * @returns CommonResult OK - * @returns any Created - * @throws ApiError - */ - public static updatePersonalInfoUsingPost1( - umsStudentAndTeacherDto: UmsStudentAndTeacherDTO, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/update/PersonalInfo', - body: umsStudentAndTeacherDto, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } - /** - * 修改指定用户密码 - * @param updatePasswordParam updatePasswordParam - * @returns CommonResult OK - * @returns any Created - * @throws ApiError - */ - public static updatePasswordUsingPost1( - updatePasswordParam: UpdateAdminPasswordParam, - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/user/updatePassword', - body: updatePasswordParam, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }) - } + /** + * 发送短信返回验证码 + * @param phone phone + * @returns CommonResult_string_ OK + * @returns any Created + * @throws ApiError + */ + public static sendVerifyCodeUsingPost1( + phone: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/code', + query: { + 'phone': phone, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 获取教师信息列表,关联教师的username和name + * @returns BaseResponse_List_TeacherInfVO_ OK + * @throws ApiError + */ + public static getTeacherInfListUsingGet1(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/user/get_teacherinf_list', + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 获取当前登录用户信息 + * @param name + * @returns CommonResult OK + * @throws ApiError + */ + public static getAdminInfoUsingGet1( + name?: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/user/info', + query: { + 'name': name, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 用户名登录以后返回token + * @param umsAdmin umsAdmin + * @returns CommonResult OK + * @returns any Created + * @throws ApiError + */ + public static loginUsingPost1( + umsAdmin: UmsAdmin, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/login', + body: umsAdmin, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 获取指定个人信息 + * @param id id + * @returns CommonResult OK + * @returns any Created + * @throws ApiError + */ + public static getByIdPersonalInfoUsingPost1( + id: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/personal/info', + query: { + 'id': id, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 手机号登录以后返回token + * @param phone phone + * @returns CommonResult OK + * @returns any Created + * @throws ApiError + */ + public static phoneLoginUsingPost1( + phone: string, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/phone/login', + query: { + 'phone': phone, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 手机号注册 + * @param umsAdminParam umsAdminParam + * @returns CommonResult_UmsAdmin_ OK + * @returns any Created + * @throws ApiError + */ + public static phoneRegisterUsingPost1( + umsAdminParam: UmsAdminParam, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/phone/register', + body: umsAdminParam, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 刷新token + * @returns CommonResult OK + * @throws ApiError + */ + public static refreshTokenUsingGet1(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/user/refreshToken', + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 用户注册 + * @param umsAdminParam umsAdminParam + * @returns CommonResult_UmsAdmin_ OK + * @returns any Created + * @throws ApiError + */ + public static registerUsingPost1( + umsAdminParam: UmsAdminParam, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/register', + body: umsAdminParam, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 修改指定用户信息 + * @param umsadmin umsadmin + * @returns CommonResult OK + * @returns any Created + * @throws ApiError + */ + public static updateUmsUsingPost1( + umsadmin: UmsAdmin, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/update', + body: umsadmin, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 修改指定个人信息 + * @param umsStudentAndTeacherDto umsStudentAndTeacherDTO + * @returns CommonResult OK + * @returns any Created + * @throws ApiError + */ + public static updatePersonalInfoUsingPost1( + umsStudentAndTeacherDto: UmsStudentAndTeacherDTO, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/update/PersonalInfo', + body: umsStudentAndTeacherDto, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * 修改指定用户密码 + * @param updatePasswordParam updatePasswordParam + * @returns CommonResult OK + * @returns any Created + * @throws ApiError + */ + public static updatePasswordUsingPost1( + updatePasswordParam: UpdateAdminPasswordParam, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/updatePassword', + body: updatePasswordParam, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } } diff --git a/package.json b/package.json index 06bb899..e94be32 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite --open", - "build": "vue-tsc && vite build", + "build": "vite build", "preview": "vite preview", "build:test": "vue-tsc && vite build --mode test", "build:pro": "vue-tsc && vite build --mode production", diff --git a/src/api/record.js b/src/api/record.js index 176527b..872c99b 100644 --- a/src/api/record.js +++ b/src/api/record.js @@ -1,8 +1,8 @@ import request from '@/utils/request' //获取浏览记录列表 export const getRecordListService = (params) => - request.get('/learningrecords/getall', { params }) + request.get('/api/learningrecords/getall', { params }) //删除浏览记录 export function DelRecordService(ids) { - return request.delete(`h/learningrecords/delete?ids=${ids}`) + return request.delete(`h//api/learningrecords/delete?ids=${ids}`) } diff --git a/src/api/user/crouse.js b/src/api/user/crouse.js index c5e4e0b..10b64ce 100644 --- a/src/api/user/crouse.js +++ b/src/api/user/crouse.js @@ -1,35 +1,35 @@ import request from '@/utils/request' // 获取课程列表 export const getCourseListApi = (params) => { - return request.get('/coursesteacher/page', { + return request.get('/api/coursesteacher/page', { params, }) } // 编辑课程 export const editCourseApi = (params) => { - return request.put('/coursesteacher', params) + return request.put('/api/coursesteacher', params) } // 添加课程 export const addCourseApi = (data) => { - return request.post(`/coursesteacher/addcourse`, data) + return request.post(`/api/coursesteacher/addcourse`, data) } // 获取课程详情 export const getCourseDetailApi = (id) => { - return request.get(`/coursesteacher/${id}`) + return request.get(`/api/coursesteacher/${id}`) } // 删除课程 export const deleteCourseApi = (id) => { - return request.delete(`/coursesteacher/${id}`) + return request.delete(`/api/coursesteacher/${id}`) } // 获取课程id export const getCourseObjectApi = (id) => { - return request.get(`/course_objectives/list/${id}`) + return request.get(`/api/course_objectives/list/${id}`) } // 获取教师列表 export const getTeacherListApi = () => { - return request.get('/user/get_teacherinf_list') + return request.get('/api/user/get_teacherinf_list') } export const fnNameGet = (params) => { @@ -44,7 +44,7 @@ export const getPageCourses = (data) => { console.log(data.pageSize) // return request.get(`/courses/index`,data) return request.get( - `/coursesteacher/index?page=${data.page}&pageSize=${data.pageSize}`, + `/api/coursesteacher/index?page=${data.page}&pageSize=${data.pageSize}`, ) } // {id:1} diff --git a/src/api/user/index.ts b/src/api/user/index.ts index 1b52c92..4b9a85e 100644 --- a/src/api/user/index.ts +++ b/src/api/user/index.ts @@ -3,9 +3,9 @@ import { loginType, loginResponseType, userInfoType } from './types' //项目用户相关的请求地址 enum API { - LOGIN_URL = '/user/login', - USERINFO_URL = '/user/info', - LOGOUT_URL = '/user/logout', + LOGIN_URL = '/api/user/login', + USERINFO_URL = '/api/user/info', + LOGOUT_URL = '/api/user/logout', } // 用户登录 export const reqLogin = (data: loginType) => diff --git a/src/api/user/user.js b/src/api/user/user.js index 02399b7..ad88cd7 100644 --- a/src/api/user/user.js +++ b/src/api/user/user.js @@ -1,48 +1,48 @@ import request from '@/utils/request' //账号登录接口 export const userLoginService = (loginData) => { - return request.post('/user/login', loginData, { + return request.post('/api/user/login', loginData, { headers: { 'Content-Type': 'application/json;charset=UTF-8' }, }) } //手机号登录接口 export const userPhoneLoginService = (phones) => { - return request.post('/user/phone/login?phone=' + phones) + return request.post('/api/user/phone/login?phone=' + phones) } //账号注册接口 export const userRegisterService = (jsonData) => { - return request.post('/user/register', jsonData, { + return request.post('/api/user/register', jsonData, { headers: { 'Content-Type': 'application/json;charset=UTF-8' }, }) } //手机号注册接口 export const userPhoneRegisterService = (jsonData) => { - return request.post('/user/phone/register', jsonData, { + return request.post('/api/user/phone/register', jsonData, { headers: { 'Content-Type': 'application/json;charset=UTF-8' }, }) } //手机号验证码请求 export const userCodeRegisterService = (phoness) => { - return request.post('/user/code?phone=' + phoness) + return request.post('/api/user/code?phone=' + phoness) } //用户信息接口 export const userGetInfoService = (token) => - request.get('/user/info', { + request.get('/api/user/info', { headers: { Authorization: `Bearer ${token}` }, }) //修改用户信息 export const userChangeService = (jsonData) => { - return request.post('/user/update', jsonData, { + return request.post('/api/user/update', jsonData, { headers: { 'Content-Type': 'application/json;charset=UTF-8' }, }) } //获取身份信息 export const userIdenService = (id) => { - return request.post('/user/personal/info?id=' + id) + return request.post('/api/user/personal/info?id=' + id) } //修改身份信息 export const userIdenChangeService = (dataToSend) => { - return request.post('/user/update/PersonalInfo', dataToSend, { + return request.post('/api/user/update/PersonalInfo', dataToSend, { headers: { 'Content-Type': 'application/json;charset=UTF-8' }, }) }