企业微信异步执行

master
zhaoxiaolin 7 months ago
parent d2962d71ed
commit c5f0487ade

@ -7,10 +7,7 @@ import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalTime; import java.time.LocalTime;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutorService; import java.util.concurrent.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -309,11 +306,11 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
} }
logger.info("质检检验企业微信提醒请求:" + JSONObject.toJSONString(wecharts)); logger.info("质检检验企业微信提醒请求:" + JSONObject.toJSONString(wecharts));
if (!CollectionUtils.isEmpty(wecharts)) { if (!CollectionUtils.isEmpty(wecharts)) {
new Thread(() -> { CompletableFuture.runAsync(() -> {
System.out.println("异步执行企业微信发送");
AjaxResult result = remoteOpenService.sendWeChartMessage(wecharts); AjaxResult result = remoteOpenService.sendWeChartMessage(wecharts);
logger.info("质检检验企业微信提醒结果:" + JSONObject.toJSONString(result)); logger.info("质检检验企业微信提醒结果:" + JSONObject.toJSONString(result));
});
}).start();
} }
//发企业微信--------------------结束 //发企业微信--------------------结束
} }

Loading…
Cancel
Save