修复api

This commit is contained in:
chenxing
2026-08-19 11:28:31 +08:00
parent bf6439888e
commit eb0ab76c83
7 changed files with 107 additions and 104 deletions
+4 -1
View File
@@ -27,7 +27,10 @@ export default {
if (apiDescriptor.deprecated) { if (apiDescriptor.deprecated) {
return undefined; return undefined;
} }
const newOpId = apiDescriptor.summary?.trim() || apiDescriptor.operationId; // 优先使用后端显式声明的 operationId(稳定、可读、无重名后缀),
// 仅在 operationId 缺失时回退到 summary。切勿用 summary 覆盖 operationId,
// 否则中文/长文本 summary 会变成方法名导致运行时查不到。
const newOpId = apiDescriptor.operationId ?? apiDescriptor.summary?.trim();
const url = apiDescriptor.url.replace(/^\/{platform}\//, "/api/"); const url = apiDescriptor.url.replace(/^\/{platform}\//, "/api/");
// springdoc 默认把 Controller 类名转为 kebab tag(如 base-controller), // springdoc 默认把 Controller 类名转为 kebab tag(如 base-controller),
// 而业务代码统一用 Pascal 无 Controller 的命名空间(如 Base)调用。 // 而业务代码统一用 Pascal 无 Controller 的命名空间(如 Base)调用。
+3 -3
View File
@@ -79,8 +79,8 @@ export default {
'SysGroup.getSchoolTree': ['GET', '/api/sysgroup/GetSchoolTree'], 'SysGroup.getSchoolTree': ['GET', '/api/sysgroup/GetSchoolTree'],
'PushSubscription.recordList': ['GET', '/api/push/RecordList'], 'PushSubscription.recordList': ['GET', '/api/push/RecordList'],
'PushSubscription.download': ['GET', '/api/push/Download/{id}'], 'PushSubscription.download': ['GET', '/api/push/Download/{id}'],
'SysOperationLog.list_2': ['GET', '/api/oplog/List'], 'SysOperationLog.operationLogList': ['GET', '/api/oplog/List'],
'SysOperationLog.download_1': ['GET', '/api/oplog/Download/{id}'], 'SysOperationLog.operationLogDownload': ['GET', '/api/oplog/Download/{id}'],
'Identity.current': ['GET', '/api/identity/current'], 'Identity.current': ['GET', '/api/identity/current'],
'Identity.available': ['GET', '/api/identity/available'], 'Identity.available': ['GET', '/api/identity/available'],
'GroupAuthz.userRoles': ['GET', '/api/groupauthz/UserRoles'], 'GroupAuthz.userRoles': ['GET', '/api/groupauthz/UserRoles'],
@@ -112,6 +112,6 @@ export default {
'User.byId': ['GET', '/oapi/user/byId'], 'User.byId': ['GET', '/oapi/user/byId'],
'SignKeyInternal.signKey': ['GET', '/oapi/internal/sign-key/{appId}'], 'SignKeyInternal.signKey': ['GET', '/oapi/internal/sign-key/{appId}'],
'Group.tree': ['GET', '/oapi/group/tree'], 'Group.tree': ['GET', '/oapi/group/tree'],
'Group.list_3': ['GET', '/oapi/group/list'], 'Group.list_2': ['GET', '/oapi/group/list'],
'Group.byId_1': ['GET', '/oapi/group/byId'] 'Group.byId_1': ['GET', '/oapi/group/byId']
}; };
+95 -95
View File
@@ -455,12 +455,12 @@ export interface ApplicationContext {
parent?: ApplicationContext; parent?: ApplicationContext;
id?: string; id?: string;
displayName?: string; displayName?: string;
autowireCapableBeanFactory?: AutowireCapableBeanFactory;
applicationName?: string; applicationName?: string;
autowireCapableBeanFactory?: AutowireCapableBeanFactory;
startupDate?: number; startupDate?: number;
environment?: Environment; environment?: Environment;
beanDefinitionNames?: string[];
beanDefinitionCount?: number; beanDefinitionCount?: number;
beanDefinitionNames?: string[];
parentBeanFactory?: BeanFactory; parentBeanFactory?: BeanFactory;
classLoader?: { classLoader?: {
parent?: { parent?: {
@@ -481,22 +481,33 @@ export interface RedirectView {
attributeNames?: object; attributeNames?: object;
majorVersion?: number; majorVersion?: number;
contextPath?: string; contextPath?: string;
minorVersion?: number;
initParameterNames?: object;
/** /**
* @deprecated * @deprecated
*/ */
servletNames?: object; servletNames?: object;
minorVersion?: number;
initParameterNames?: object;
sessionTimeout?: number; sessionTimeout?: number;
serverInfo?: string;
/** /**
* @deprecated * @deprecated
*/ */
servlets?: object; servlets?: object;
responseCharacterEncoding?: string;
defaultSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[];
virtualServerName?: string;
servletContextName?: string;
requestCharacterEncoding?: string; requestCharacterEncoding?: string;
filterRegistrations?: Record<
string,
{
urlPatternMappings?: string[];
servletNameMappings?: string[];
name?: string;
className?: string;
initParameters?: Record<string, string>;
}
>;
servletContextName?: string;
sessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[];
effectiveMinorVersion?: number;
defaultSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[];
servletRegistrations?: Record< servletRegistrations?: Record<
string, string,
{ {
@@ -508,39 +519,7 @@ export interface RedirectView {
} }
>; >;
effectiveMajorVersion?: number; effectiveMajorVersion?: number;
sessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[]; virtualServerName?: string;
effectiveMinorVersion?: number;
effectiveSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[];
jspConfigDescriptor?: {
taglibs?: Array<{
taglibURI?: string;
taglibLocation?: string;
}>;
jspPropertyGroups?: Array<{
buffer?: string;
defaultContentType?: string;
urlPatterns?: string[];
deferredSyntaxAllowedAsLiteral?: string;
pageEncoding?: string;
includeCodas?: string[];
isXml?: string;
elIgnored?: string;
scriptingInvalid?: string;
includePreludes?: string[];
trimDirectiveWhitespaces?: string;
errorOnUndeclaredNamespace?: string;
}>;
};
filterRegistrations?: Record<
string,
{
servletNameMappings?: string[];
urlPatternMappings?: string[];
name?: string;
className?: string;
initParameters?: Record<string, string>;
}
>;
sessionCookieConfig?: { sessionCookieConfig?: {
name?: string; name?: string;
path?: string; path?: string;
@@ -550,7 +529,28 @@ export interface RedirectView {
maxAge?: number; maxAge?: number;
httpOnly?: boolean; httpOnly?: boolean;
}; };
serverInfo?: string; jspConfigDescriptor?: {
taglibs?: Array<{
taglibURI?: string;
taglibLocation?: string;
}>;
jspPropertyGroups?: Array<{
buffer?: string;
urlPatterns?: string[];
defaultContentType?: string;
elIgnored?: string;
pageEncoding?: string;
isXml?: string;
includeCodas?: string[];
trimDirectiveWhitespaces?: string;
includePreludes?: string[];
scriptingInvalid?: string;
errorOnUndeclaredNamespace?: string;
deferredSyntaxAllowedAsLiteral?: string;
}>;
};
responseCharacterEncoding?: string;
effectiveSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[];
}; };
contentType?: string; contentType?: string;
requestContextAttribute?: string; requestContextAttribute?: string;
@@ -2517,8 +2517,8 @@ declare global {
* parent?: ApplicationContext * parent?: ApplicationContext
* id?: string * id?: string
* displayName?: string * displayName?: string
* autowireCapableBeanFactory?: object
* applicationName?: string * applicationName?: string
* autowireCapableBeanFactory?: object
* startupDate?: number * startupDate?: number
* environment?: { * environment?: {
* // [items] start * // [items] start
@@ -2528,10 +2528,10 @@ declare global {
* // [items] end * // [items] end
* defaultProfiles?: string[] * defaultProfiles?: string[]
* } * }
* beanDefinitionCount?: number
* // [items] start * // [items] start
* // [items] end * // [items] end
* beanDefinitionNames?: string[] * beanDefinitionNames?: string[]
* beanDefinitionCount?: number
* parentBeanFactory?: object * parentBeanFactory?: object
* classLoader?: { * classLoader?: {
* parent?: { * parent?: {
@@ -2550,20 +2550,37 @@ declare global {
* attributeNames?: object * attributeNames?: object
* majorVersion?: number * majorVersion?: number
* contextPath?: string * contextPath?: string
* minorVersion?: number
* initParameterNames?: object
* // [deprecated] * // [deprecated]
* servletNames?: object * servletNames?: object
* minorVersion?: number
* initParameterNames?: object
* sessionTimeout?: number * sessionTimeout?: number
* serverInfo?: string
* // [deprecated] * // [deprecated]
* servlets?: object * servlets?: object
* responseCharacterEncoding?: string * requestCharacterEncoding?: string
* filterRegistrations?: Record<
* string,
* {
* // [items] start
* // [items] end
* urlPatternMappings?: string[]
* // [items] start
* // [items] end
* servletNameMappings?: string[]
* name?: string
* className?: string
* initParameters?: Record<string, string>
* }
* >
* servletContextName?: string
* // [items] start
* // [items] end
* sessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[]
* effectiveMinorVersion?: number
* // [items] start * // [items] start
* // [items] end * // [items] end
* defaultSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[] * defaultSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[]
* virtualServerName?: string
* servletContextName?: string
* requestCharacterEncoding?: string
* servletRegistrations?: Record< * servletRegistrations?: Record<
* string, * string,
* { * {
@@ -2577,13 +2594,16 @@ declare global {
* } * }
* > * >
* effectiveMajorVersion?: number * effectiveMajorVersion?: number
* // [items] start * virtualServerName?: string
* // [items] end * sessionCookieConfig?: {
* sessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[] * name?: string
* effectiveMinorVersion?: number * path?: string
* // [items] start * comment?: string
* // [items] end * domain?: string
* effectiveSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[] * secure?: boolean
* maxAge?: number
* httpOnly?: boolean
* }
* jspConfigDescriptor?: { * jspConfigDescriptor?: {
* // [items] start * // [items] start
* // [items] end * // [items] end
@@ -2595,49 +2615,29 @@ declare global {
* // [items] end * // [items] end
* jspPropertyGroups?: Array<{ * jspPropertyGroups?: Array<{
* buffer?: string * buffer?: string
* defaultContentType?: string
* // [items] start * // [items] start
* // [items] end * // [items] end
* urlPatterns?: string[] * urlPatterns?: string[]
* deferredSyntaxAllowedAsLiteral?: string * defaultContentType?: string
* elIgnored?: string
* pageEncoding?: string * pageEncoding?: string
* isXml?: string
* // [items] start * // [items] start
* // [items] end * // [items] end
* includeCodas?: string[] * includeCodas?: string[]
* isXml?: string * trimDirectiveWhitespaces?: string
* elIgnored?: string
* scriptingInvalid?: string
* // [items] start * // [items] start
* // [items] end * // [items] end
* includePreludes?: string[] * includePreludes?: string[]
* trimDirectiveWhitespaces?: string * scriptingInvalid?: string
* errorOnUndeclaredNamespace?: string * errorOnUndeclaredNamespace?: string
* deferredSyntaxAllowedAsLiteral?: string
* }> * }>
* } * }
* filterRegistrations?: Record< * responseCharacterEncoding?: string
* string, * // [items] start
* { * // [items] end
* // [items] start * effectiveSessionTrackingModes?: ('COOKIE' | 'URL' | 'SSL')[]
* // [items] end
* servletNameMappings?: string[]
* // [items] start
* // [items] end
* urlPatternMappings?: string[]
* name?: string
* className?: string
* initParameters?: Record<string, string>
* }
* >
* sessionCookieConfig?: {
* name?: string
* path?: string
* comment?: string
* domain?: string
* secure?: boolean
* maxAge?: number
* httpOnly?: boolean
* }
* serverInfo?: string
* } * }
* contentType?: string * contentType?: string
* requestContextAttribute?: string * requestContextAttribute?: string
@@ -5080,7 +5080,7 @@ declare global {
* }> * }>
* ``` * ```
*/ */
list_3< list_2<
Config extends Alova2MethodConfig<BoaGroup[]> & { Config extends Alova2MethodConfig<BoaGroup[]> & {
params: { params: {
ids: string; ids: string;
@@ -5089,7 +5089,7 @@ declare global {
} }
>( >(
config: Config config: Config
): Alova2Method<BoaGroup[], 'Group.list_3', Config>; ): Alova2Method<BoaGroup[], 'Group.list_2', Config>;
/** /**
* --- * ---
* *
@@ -5139,7 +5139,7 @@ declare global {
/** /**
* --- * ---
* *
* [GET] * [GET] 操作日志分页查询
* *
* **path:** /api/oplog/List * **path:** /api/oplog/List
* *
@@ -5201,7 +5201,7 @@ declare global {
* } * }
* ``` * ```
*/ */
list_2< operationLogList<
Config extends Alova2MethodConfig<BasePageResultSysOperationLogListVo> & { Config extends Alova2MethodConfig<BasePageResultSysOperationLogListVo> & {
params: { params: {
query: SysOperationLogQuery; query: SysOperationLogQuery;
@@ -5210,11 +5210,11 @@ declare global {
} }
>( >(
config: Config config: Config
): Alova2Method<BasePageResultSysOperationLogListVo, 'SysOperationLog.list_2', Config>; ): Alova2Method<BasePageResultSysOperationLogListVo, 'SysOperationLog.operationLogList', Config>;
/** /**
* --- * ---
* *
* [GET] * [GET] 下载日志响应原文
* *
* **path:** /api/oplog/Download/{id} * **path:** /api/oplog/Download/{id}
* *
@@ -5234,7 +5234,7 @@ declare global {
* type Response = Blob * type Response = Blob
* ``` * ```
*/ */
download_1< operationLogDownload<
Config extends Alova2MethodConfig<Blob> & { Config extends Alova2MethodConfig<Blob> & {
pathParams: { pathParams: {
id: number; id: number;
@@ -5242,7 +5242,7 @@ declare global {
} }
>( >(
config: Config config: Config
): Alova2Method<Blob, 'SysOperationLog.download_1', Config>; ): Alova2Method<Blob, 'SysOperationLog.operationLogDownload', Config>;
}; };
SignKeyInternal: { SignKeyInternal: {
/** /**
+1 -1
View File
@@ -217,7 +217,7 @@ function doSync(interfacePath: string, loadingRef: Ref<boolean>, name: string):
} }
loadingRef.value = true; loadingRef.value = true;
return (Apis as any) return (Apis as any)
.Push.test({ .PushSubscription.test({
data: { appId: props.appId, interfacePath, targetIds: null }, data: { appId: props.appId, interfacePath, targetIds: null },
cacheFor: null, cacheFor: null,
}) })
+1 -1
View File
@@ -85,7 +85,7 @@ function clean(obj: Record<string, any>) {
} }
const tableApi = (params: { pageIndex: number; pageSize: number }) => { const tableApi = (params: { pageIndex: number; pageSize: number }) => {
return (Apis as any).OperationLog.list({ return (Apis as any).SysOperationLog.operationLogList({
params: clean({ params: clean({
keyword: dataParams.value.keyword?.trim() || undefined, keyword: dataParams.value.keyword?.trim() || undefined,
success: dataParams.value.success, success: dataParams.value.success,
+2 -2
View File
@@ -99,7 +99,7 @@ function clean(obj: Record<string, any>) {
} }
const tableApi = (params: { pageIndex: number; pageSize: number }) => { const tableApi = (params: { pageIndex: number; pageSize: number }) => {
return (Apis as any).Push.recordList({ return (Apis as any).PushSubscription.recordList({
params: clean({ params: clean({
appKey: dataParams.value.appKey, appKey: dataParams.value.appKey,
interfacePath: dataParams.value.interfacePath, interfacePath: dataParams.value.interfacePath,
@@ -185,7 +185,7 @@ function openDetail(row: any) {
async function handleRetry(row: any) { async function handleRetry(row: any) {
try { try {
await (Apis as any).Push.retry({ pathParams: { id: row.id }, cacheFor: null }); await (Apis as any).PushSubscription.retry({ pathParams: { id: row.id }, cacheFor: null });
Message.success('已重新投递,稍后在列表中查看结果'); Message.success('已重新投递,稍后在列表中查看结果');
tableRef.value?.refreshData(); tableRef.value?.refreshData();
} catch (e: any) { } catch (e: any) {
+1 -1
View File
@@ -143,7 +143,7 @@ function handleSend() {
preview.value = null; preview.value = null;
sendMessage.value = ''; sendMessage.value = '';
(Apis as any) (Apis as any)
.Push.test({ .PushSubscription.test({
data: { data: {
appId: form.value.appId, appId: form.value.appId,
interfacePath: form.value.interfacePath, interfacePath: form.value.interfacePath,