From 797cd2abd9bc6eb13369415de520c45ed08d1798 Mon Sep 17 00:00:00 2001 From: chenbowen Date: Tue, 6 Jan 2026 09:18:47 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E5=A4=8D=20deptignore=20?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3=E4=BC=9A=E5=AF=BC=E8=87=B4=E7=9A=84=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98=202.=20=E5=BB=B6=E9=95=BF?= =?UTF-8?q?=20databus=20=E9=BB=98=E8=AE=A4=E7=9A=84=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=203.=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=84=9A=E6=9C=AC=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=9A=84=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/dm/ruoyi-vue-pro-dm8.sql | 2 +- .../core/aop/DeptDataPermissionIgnoreAspect.java | 4 ++++ .../gateway/vo/definition/ApiDefinitionStepSaveReqVO.java | 2 +- .../integration/gateway/step/impl/HttpStepHandler.java | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sql/dm/ruoyi-vue-pro-dm8.sql b/sql/dm/ruoyi-vue-pro-dm8.sql index 53667219..ba46b297 100644 --- a/sql/dm/ruoyi-vue-pro-dm8.sql +++ b/sql/dm/ruoyi-vue-pro-dm8.sql @@ -25,7 +25,7 @@ CREATE TABLE infra_api_access_log ( user_ip varchar(50) NOT NULL, user_agent varchar(512) NOT NULL, operate_module varchar(50) DEFAULT NULL NULL, - operate_name varchar(50) DEFAULT NULL NULL, + operate_name varchar(256) DEFAULT NULL NULL, operate_type smallint DEFAULT 0 NULL, begin_time datetime NOT NULL, end_time datetime NOT NULL, diff --git a/zt-framework/zt-spring-boot-starter-biz-data-permission/src/main/java/com/zt/plat/framework/datapermission/core/aop/DeptDataPermissionIgnoreAspect.java b/zt-framework/zt-spring-boot-starter-biz-data-permission/src/main/java/com/zt/plat/framework/datapermission/core/aop/DeptDataPermissionIgnoreAspect.java index 4ee9054e..f00f08e1 100644 --- a/zt-framework/zt-spring-boot-starter-biz-data-permission/src/main/java/com/zt/plat/framework/datapermission/core/aop/DeptDataPermissionIgnoreAspect.java +++ b/zt-framework/zt-spring-boot-starter-biz-data-permission/src/main/java/com/zt/plat/framework/datapermission/core/aop/DeptDataPermissionIgnoreAspect.java @@ -19,6 +19,10 @@ public class DeptDataPermissionIgnoreAspect { public Object around(ProceedingJoinPoint joinPoint, DeptDataPermissionIgnore deptDataPermissionIgnore) throws Throwable { boolean oldIgnore = DeptContextHolder.shouldIgnore(); try { + if (deptDataPermissionIgnore == null) { + Class targetClass = joinPoint.getTarget().getClass(); + deptDataPermissionIgnore = targetClass.getAnnotation(DeptDataPermissionIgnore.class); + } Object enable = SpringExpressionUtils.parseExpression(deptDataPermissionIgnore.enable()); if (Boolean.TRUE.equals(enable)) { DeptContextHolder.setIgnore(true); diff --git a/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/controller/admin/gateway/vo/definition/ApiDefinitionStepSaveReqVO.java b/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/controller/admin/gateway/vo/definition/ApiDefinitionStepSaveReqVO.java index 2f66ed5e..bb158491 100644 --- a/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/controller/admin/gateway/vo/definition/ApiDefinitionStepSaveReqVO.java +++ b/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/controller/admin/gateway/vo/definition/ApiDefinitionStepSaveReqVO.java @@ -36,7 +36,7 @@ public class ApiDefinitionStepSaveReqVO { @Schema(description = "响应映射表达式(JSON)") private String responseMappingExpr; - @Schema(description = "超时时间(毫秒)", example = "5000") + @Schema(description = "超时时间(毫秒),缺省 20000(20s)", example = "20000") private Long timeout; @Schema(description = "降级策略(JSON)") diff --git a/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/framework/integration/gateway/step/impl/HttpStepHandler.java b/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/framework/integration/gateway/step/impl/HttpStepHandler.java index 58a7c7fd..7f00b6ce 100644 --- a/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/framework/integration/gateway/step/impl/HttpStepHandler.java +++ b/zt-module-databus/zt-module-databus-server/src/main/java/com/zt/plat/module/databus/framework/integration/gateway/step/impl/HttpStepHandler.java @@ -48,6 +48,7 @@ public class HttpStepHandler implements ApiStepHandler { private static final Duration RETRY_DELAY = Duration.ofMillis(200); private static final int RETRY_ATTEMPTS = 3; + private static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(20); private static final Set DEFAULT_FORWARDED_HEADERS = Set.of( "authorization", @@ -229,7 +230,7 @@ public class HttpStepHandler implements ApiStepHandler { private Duration resolveTimeout(ApiStepDefinition stepDefinition) { Long timeout = stepDefinition.getStep().getTimeout(); if (timeout == null || timeout <= 0) { - return Duration.ofSeconds(5); + return DEFAULT_TIMEOUT; } return Duration.ofMillis(timeout); }