|
|
@ -1,6 +1,5 @@ |
|
|
|
package com.elink.esua.epdc.service.impl; |
|
|
|
|
|
|
|
import com.elink.esua.epdc.dao.ScreenRecordDao; |
|
|
|
import com.elink.esua.epdc.feign.AnalysisFeignClient; |
|
|
|
import com.elink.esua.epdc.service.ScreenProjectDataMonthPushTask; |
|
|
|
import org.slf4j.Logger; |
|
|
@ -8,10 +7,8 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.concurrent.Callable; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.Executors; |
|
|
|
import java.util.concurrent.Future; |
|
|
|
|
|
|
|
/** |
|
|
|
* @program: esua-epdc |
|
|
@ -29,33 +26,10 @@ public class ScreenProjectDataPushMinuteTaskImpl implements ScreenProjectDataMon |
|
|
|
@Autowired |
|
|
|
private AnalysisFeignClient analysisFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ScreenRecordDao screenRecordDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public void run(String param) { |
|
|
|
for (int i = 0; i < 11; i++) { |
|
|
|
createThread(i); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public Integer createThread(Integer methodIndex) { |
|
|
|
Future<Integer> future = service.submit(new Callable<Integer>() { |
|
|
|
@Override |
|
|
|
public Integer call() throws Exception { |
|
|
|
Thread.sleep(200); |
|
|
|
// 010、中央区各类总数
|
|
|
|
customerUsertotaldata(); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
}); |
|
|
|
Integer isSuccess = 0; |
|
|
|
try { |
|
|
|
isSuccess = future.get(); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
return isSuccess; |
|
|
|
// 010、中央区各类总数
|
|
|
|
customerUsertotaldata(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|