From a3ef1860d43630c4031817c5db2fb0fe3ec05311 Mon Sep 17 00:00:00 2001 From: wulin Date: Wed, 18 Nov 2020 18:27:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=AD=90=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FlowStartServiceImpl.java | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java index 54355c12..ed91db23 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java @@ -106,8 +106,6 @@ public class FlowStartServiceImpl extends ServiceImpl threadInitFlowRecords = new ArrayList<>(); - ThreadInitFlowRecord threadInitFlowRecord; - Thread thread; @@ -812,9 +810,9 @@ public class FlowStartServiceImpl extends ServiceImpl resultRecords, List noticeStaff){ if(resultRecords.size() > 0){ - threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff); - threadInitFlowRecords.add(threadInitFlowRecord);//防止提前回收 - thread = new Thread(threadInitFlowRecord); + ThreadInitFlowRecord threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff); + threadInitFlowRecords.add(threadInitFlowRecord); + Thread thread = new Thread(threadInitFlowRecord); thread.start(); } @@ -822,12 +820,12 @@ public class FlowStartServiceImpl extends ServiceImpl resultRecords; - List noticeStaff; + List resultRecords = new ArrayList<>(); + List noticeStaff = new ArrayList<>(); public ThreadInitFlowRecord(List resultRecords, List noticeStaff){ - this.resultRecords = resultRecords; - this.noticeStaff = noticeStaff; + this.resultRecords.addAll(resultRecords); + this.noticeStaff.addAll(noticeStaff); } @Override @@ -836,20 +834,12 @@ public class FlowStartServiceImpl extends ServiceImpl