From bd7f9761d8fd987c8c543cf71e73fa1150e562d3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 23 Jan 2025 20:16:19 +0800 Subject: [PATCH] https://gitee.com/zhijiantianya/yudao-cloud/pulls/165/files --- .../framework/apilog/core/filter/ApiAccessLogFilter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java index d798b7044e..8539fccd78 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/core/filter/ApiAccessLogFilter.java @@ -146,9 +146,11 @@ public class ApiAccessLogFilter extends ApiRequestFilter { if (handlerMethod != null) { Tag tagAnnotation = handlerMethod.getBeanType().getAnnotation(Tag.class); Operation operationAnnotation = handlerMethod.getMethodAnnotation(Operation.class); - String operateModule = accessLogAnnotation != null ? accessLogAnnotation.operateModule() : + String operateModule = accessLogAnnotation != null && StrUtil.isNotBlank(accessLogAnnotation.operateModule()) ? + accessLogAnnotation.operateModule() : tagAnnotation != null ? StrUtil.nullToDefault(tagAnnotation.name(), tagAnnotation.description()) : null; - String operateName = accessLogAnnotation != null ? accessLogAnnotation.operateName() : + String operateName = accessLogAnnotation != null && StrUtil.isNotBlank(accessLogAnnotation.operateName()) ? + accessLogAnnotation.operateName() : operationAnnotation != null ? operationAnnotation.summary() : null; OperateTypeEnum operateType = accessLogAnnotation != null && accessLogAnnotation.operateType().length > 0 ? accessLogAnnotation.operateType()[0] : parseOperateLogType(request);