Sfoglia il codice sorgente

无车优化,自有车接口返回

Administrator 2 anni fa
parent
commit
58fe1940f8

+ 2 - 5
src/main/java/com/jkcredit/invoice/component/StatisRequestIdTimeComp.java

@@ -6,10 +6,7 @@ import org.springframework.stereotype.Component;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.*;
 
 @Component
 @Slf4j
@@ -28,7 +25,7 @@ public class StatisRequestIdTimeComp {
      * requestId 及 时间
      */
     public Map<String, Long> map = new ConcurrentHashMap<>();
-    ScheduledExecutorService service = Executors.newScheduledThreadPool(1);
+    ScheduledExecutorService service =new ScheduledThreadPoolExecutor(1);
     /**
      * 关注的请求时间秒
      */

+ 2 - 2
src/main/java/com/jkcredit/invoice/task/ScheduledBillTask.java

@@ -36,8 +36,8 @@ import java.util.concurrent.ExecutorService;
 @Component
 @Slf4j
 public class ScheduledBillTask {
-
-    ExecutorService executorService = ThreadPoolFactory.getThreadPool("qupaioxiancheng", 40, 50);
+    
+    ExecutorService executorService = ThreadPoolFactory.getThreadPool("qupaioxiancheng",20,50);
     @Autowired
     NoCarWaybillMapper noCarWaybillMapper;