Merge branch 'dev' into test

This commit is contained in:
chenbowen
2026-01-14 15:28:47 +08:00
6 changed files with 22 additions and 17 deletions

View File

@@ -25,6 +25,7 @@
<module>zt-module-databus</module>
<!-- <module>zt-module-rule</module>-->
<!-- <module>zt-module-html2pdf</module>-->
<!-- <module>zt-server</module>-->
</modules>
<name>${project.artifactId}</name>
@@ -32,7 +33,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties>
<revision>3.0.46</revision>
<revision>3.0.47-SNAPSHOT</revision>
<!-- Maven 相关 -->
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>

View File

@@ -26,7 +26,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties>
<revision>3.0.46</revision>
<revision>3.0.47-SNAPSHOT</revision>
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<!-- 统一依赖管理 -->
<spring.boot.version>3.4.5</spring.boot.version>

View File

@@ -9,7 +9,7 @@ import java.util.concurrent.*;
* 多次提交,一次等待
*/
public class AsyncLatchUtils {
private static final ThreadLocal<List<TaskInfo>> THREADLOCAL = ThreadLocal.withInitial(LinkedList::new);
private static final ThreadLocal<List<TaskInfo>> THREAD_LOCAL = ThreadLocal.withInitial(LinkedList::new);
/**
* 提交一个异步任务
@@ -17,7 +17,7 @@ public class AsyncLatchUtils {
* @param runnable 需要异步执行的具体业务逻辑
*/
public static void submitTask(Executor executor, Runnable runnable) {
THREADLOCAL.get().add(new TaskInfo(executor, runnable));
THREAD_LOCAL.get().add(new TaskInfo(executor, runnable));
}
/**
@@ -25,8 +25,8 @@ public class AsyncLatchUtils {
* @return
*/
private static List<TaskInfo> popTask() {
List<TaskInfo> taskInfos = THREADLOCAL.get();
THREADLOCAL.remove();
List<TaskInfo> taskInfos = THREAD_LOCAL.get();
THREAD_LOCAL.remove();
return taskInfos;
}
@@ -39,7 +39,7 @@ public class AsyncLatchUtils {
*/
public static boolean waitFor(long timeout, TimeUnit timeUnit) {
List<TaskInfo> taskInfos = popTask();
if (taskInfos.isEmpty()) {
if (taskInfos.isEmpty()) {
return true;
}
CountDownLatch latch = new CountDownLatch(taskInfos.size());
@@ -57,8 +57,11 @@ public class AsyncLatchUtils {
boolean await = false;
try {
await = latch.await(timeout, timeUnit);
} catch (Exception ignored) {}
return await;
} catch (Exception ignored) {
// 恢复中断状态
Thread.currentThread().interrupt();
}
return await;
}
private static final class TaskInfo {

View File

@@ -33,7 +33,7 @@ public class BusinessDataPermissionEntityScanner {
*/
private static final Set<String> EXCLUDED_PACKAGE_PREFIXES = Set.of(
"com.zt.plat.module.backendlogistics",
"com.zt.plat.module.erp",
// "com.zt.plat.module.erp",
"com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO");
private final Set<String> basePackages;

View File

@@ -43,11 +43,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.zt.plat</groupId>
<artifactId>zt-module-template-server</artifactId>
<version>${revision}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.zt.plat</groupId>-->
<!-- <artifactId>zt-module-template-server</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- 会员中心。默认注释,保证编译速度 -->
<!-- <dependency>-->

View File

@@ -62,7 +62,8 @@ spring:
host: 172.16.46.63 # 地址
port: 30379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
password: P@ssword25
username: zt-redis
--- #################### 定时任务相关配置 ####################
@@ -76,7 +77,7 @@ xxl:
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
name-server: 172.16.46.63:30876 # RocketMQ Namesrv
spring:
# RabbitMQ 配置项,对应 RabbitProperties 配置类