From c467370d8741bc05ca7c22d4253c58ac0a979ef5 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 09 六月 2026 09:46:25 +0800
Subject: [PATCH] 功能优化
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
index 3b7589b..1fd3684 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -39,6 +39,7 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -47,6 +48,7 @@
import java.io.IOException;
import java.util.*;
import java.util.Date;
+import java.util.concurrent.Executor;
import java.util.stream.Collectors;
/**
@@ -58,6 +60,9 @@
@Slf4j
public class HkSyncPushServiceImpl extends HkSyncBaseServiceImpl {
+ @Autowired
+ @Qualifier("asyncExecutor")
+ private Executor asyncExecutor;
@Autowired
private InoutDayCountMapper inoutDayCountMapper;
@Autowired
@@ -598,9 +603,7 @@
private void dealNoticeTelecomEvent(EventBaseRequest param,EventBaseInfoRequest request ,List<WarningEvent> list) {
try {
log.error("========閫氱煡鍏朵粬涓夋柟鍦板潃绂诲矖浜嬩欢寮�濮�:"+list.size());
- Thread t1=new Thread(new Runnable() {
- @Override
- public void run() {
+ asyncExecutor.execute(() -> {
// EventBaseRequest submitParam = new EventBaseRequest();
// submitParam.setMethod(param.getMethod());
// submitParam.setParams(new EventBaseParamRequest());
@@ -664,11 +667,9 @@
log.error("========閫氱煡鍏朵粬涓夋柟鍦板潃绂诲矖浜嬩欢宸叉帹閫侊紝缁撴灉:"+s+"\n"+response);
}
}
- }
- });
- t1.start();
+ });
}catch (Exception e){
- e.printStackTrace();
+ log.error("dealNoticeTelecomEvent寮傚父", e);
}
}
--
Gitblit v1.9.3