Compare commits

...

8 Commits

Author SHA1 Message Date
FCL
e4c8d308f3 Merge branch 'refs/heads/zt-test' into test 2026-01-07 11:19:40 +08:00
chenbowen
b245bed7da Merge branch 'dev' into test 2026-01-06 15:24:46 +08:00
chenbowen
b86a9a2811 Merge remote-tracking branch 'base-version/main' into dev 2026-01-06 15:24:13 +08:00
chenbowen
09c9276deb 1. 修复 CompanyDataPermissionIgnoreAspect 空指针问题 2026-01-06 11:17:20 +08:00
chenbowen
797cd2abd9 1. 修复 deptignore 注解会导致的空指针问题
2. 延长 databus 默认的请求超时时间
3. 调整初始化脚本部分字段的长度
2026-01-06 09:18:47 +08:00
maimaishu
88b280a33f [+]增加IWork根据ID同步接口 2026-01-05 11:33:11 +08:00
maimaishu
2e761d1867 [+]增加部门推动消息功能 2026-01-02 17:27:53 +08:00
qianshijiang
b155b1a00a 数据库配置修改 2025-12-31 16:36:01 +08:00
33 changed files with 578 additions and 232 deletions

View File

@@ -25,7 +25,7 @@ CREATE TABLE infra_api_access_log (
user_ip varchar(50) NOT NULL, user_ip varchar(50) NOT NULL,
user_agent varchar(512) NOT NULL, user_agent varchar(512) NOT NULL,
operate_module varchar(50) DEFAULT NULL 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, operate_type smallint DEFAULT 0 NULL,
begin_time datetime NOT NULL, begin_time datetime NOT NULL,
end_time datetime NOT NULL, end_time datetime NOT NULL,

View File

@@ -25,6 +25,7 @@ public interface GlobalErrorCodeConstants {
ErrorCode METHOD_NOT_ALLOWED = new ErrorCode(405, "请求方法不正确"); ErrorCode METHOD_NOT_ALLOWED = new ErrorCode(405, "请求方法不正确");
ErrorCode LOCKED = new ErrorCode(423, "请求失败,请稍后重试"); // 并发请求,不允许 ErrorCode LOCKED = new ErrorCode(423, "请求失败,请稍后重试"); // 并发请求,不允许
ErrorCode TOO_MANY_REQUESTS = new ErrorCode(429, "请求过于频繁,请稍后重试"); ErrorCode TOO_MANY_REQUESTS = new ErrorCode(429, "请求过于频繁,请稍后重试");
ErrorCode NOT_NULL_REQUEST_ERROR = new ErrorCode(430, "请求参数不能为空");
// ========== 服务端错误段 ========== // ========== 服务端错误段 ==========

View File

@@ -19,6 +19,10 @@ public class CompanyDataPermissionIgnoreAspect {
public Object around(ProceedingJoinPoint joinPoint, CompanyDataPermissionIgnore companyDataPermissionIgnore) throws Throwable { public Object around(ProceedingJoinPoint joinPoint, CompanyDataPermissionIgnore companyDataPermissionIgnore) throws Throwable {
boolean oldIgnore = CompanyContextHolder.isIgnore(); boolean oldIgnore = CompanyContextHolder.isIgnore();
try { try {
if (companyDataPermissionIgnore == null) {
Class<?> targetClass = joinPoint.getTarget().getClass();
companyDataPermissionIgnore = targetClass.getAnnotation(CompanyDataPermissionIgnore.class);
}
Object enable = SpringExpressionUtils.parseExpression(companyDataPermissionIgnore.enable()); Object enable = SpringExpressionUtils.parseExpression(companyDataPermissionIgnore.enable());
if (Boolean.TRUE.equals(enable)) { if (Boolean.TRUE.equals(enable)) {
CompanyContextHolder.setIgnore(true); CompanyContextHolder.setIgnore(true);

View File

@@ -19,6 +19,10 @@ public class DeptDataPermissionIgnoreAspect {
public Object around(ProceedingJoinPoint joinPoint, DeptDataPermissionIgnore deptDataPermissionIgnore) throws Throwable { public Object around(ProceedingJoinPoint joinPoint, DeptDataPermissionIgnore deptDataPermissionIgnore) throws Throwable {
boolean oldIgnore = DeptContextHolder.shouldIgnore(); boolean oldIgnore = DeptContextHolder.shouldIgnore();
try { try {
if (deptDataPermissionIgnore == null) {
Class<?> targetClass = joinPoint.getTarget().getClass();
deptDataPermissionIgnore = targetClass.getAnnotation(DeptDataPermissionIgnore.class);
}
Object enable = SpringExpressionUtils.parseExpression(deptDataPermissionIgnore.enable()); Object enable = SpringExpressionUtils.parseExpression(deptDataPermissionIgnore.enable());
if (Boolean.TRUE.equals(enable)) { if (Boolean.TRUE.equals(enable)) {
DeptContextHolder.setIgnore(true); DeptContextHolder.setIgnore(true);

View File

@@ -36,7 +36,7 @@ public class ApiDefinitionStepSaveReqVO {
@Schema(description = "响应映射表达式(JSON)") @Schema(description = "响应映射表达式(JSON)")
private String responseMappingExpr; private String responseMappingExpr;
@Schema(description = "超时时间(毫秒)", example = "5000") @Schema(description = "超时时间(毫秒),缺省 20000(20s)", example = "20000")
private Long timeout; private Long timeout;
@Schema(description = "降级策略(JSON)") @Schema(description = "降级策略(JSON)")

View File

@@ -48,6 +48,7 @@ public class HttpStepHandler implements ApiStepHandler {
private static final Duration RETRY_DELAY = Duration.ofMillis(200); private static final Duration RETRY_DELAY = Duration.ofMillis(200);
private static final int RETRY_ATTEMPTS = 3; private static final int RETRY_ATTEMPTS = 3;
private static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(20);
private static final Set<String> DEFAULT_FORWARDED_HEADERS = Set.of( private static final Set<String> DEFAULT_FORWARDED_HEADERS = Set.of(
"authorization", "authorization",
@@ -229,7 +230,7 @@ public class HttpStepHandler implements ApiStepHandler {
private Duration resolveTimeout(ApiStepDefinition stepDefinition) { private Duration resolveTimeout(ApiStepDefinition stepDefinition) {
Long timeout = stepDefinition.getStep().getTimeout(); Long timeout = stepDefinition.getStep().getTimeout();
if (timeout == null || timeout <= 0) { if (timeout == null || timeout <= 0) {
return Duration.ofSeconds(5); return DEFAULT_TIMEOUT;
} }
return Duration.ofMillis(timeout); return Duration.ofMillis(timeout);
} }

View File

@@ -37,14 +37,20 @@ spring:
primary: master primary: master
datasource: datasource:
master: master:
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO #url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA username: SYSDBA
password: pgbsci6ddJ6Sqj@e password: P@ssword25
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度 lazy: true # 开启懒加载,保证启动速度
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO #url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA username: SYSDBA
password: pgbsci6ddJ6Sqj@e password: P@ssword25
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data: data:
@@ -52,9 +58,8 @@ spring:
host: 172.16.46.63 # 地址 host: 172.16.46.63 # 地址
port: 30379 # 端口 port: 30379 # 端口
database: 0 # 数据库索引 database: 0 # 数据库索引
username: zt-redis username: zt-redis # 密码,建议生产环境开启
password: P@ssword25 password: P@ssword25
# password: 123456 # 密码,建议生产环境开启
xxl: xxl:
job: job:

View File

@@ -39,14 +39,20 @@ spring:
primary: master primary: master
datasource: datasource:
master: master:
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO #url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA username: SYSDBA
password: pgbsci6ddJ6Sqj@e password: P@ssword25
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度 lazy: true # 开启懒加载,保证启动速度
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO #url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA username: SYSDBA
password: pgbsci6ddJ6Sqj@e password: P@ssword25
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data: data:
@@ -54,7 +60,8 @@ spring:
host: 172.16.46.63 # 地址 host: 172.16.46.63 # 地址
port: 30379 # 端口 port: 30379 # 端口
database: 0 # 数据库索引 database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启 username: zt-redis # 密码,建议生产环境开启
password: P@ssword25
xxl: xxl:
job: job:

View File

@@ -50,7 +50,7 @@ spring:
time-to-live: 1h # 设置过期时间为 1 小时 time-to-live: 1h # 设置过期时间为 1 小时
server: server:
port: 48100 port: 48108
logging: logging:
file: file:

View File

@@ -38,14 +38,20 @@ spring:
primary: master primary: master
datasource: datasource:
master: master:
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO #url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA username: SYSDBA
password: pgbsci6ddJ6Sqj@e password: P@ssword25
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度 lazy: true # 开启懒加载,保证启动速度
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO #url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
#username: SYSDBA
#password: pgbsci6ddJ6Sqj@e
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
username: SYSDBA username: SYSDBA
password: pgbsci6ddJ6Sqj@e password: P@ssword25
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data: data:

Some files were not shown because too many files have changed in this diff Show More