From dca3e301410be4aee5a7895a1c2c1bbf90f3d03b Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 16 Mar 2022 15:21:36 +0800 Subject: [PATCH] 20222223 --- src/main/java/com/xcong/excoin/utils/ThreadPoolUtils.java | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xcong/excoin/utils/ThreadPoolUtils.java b/src/main/java/com/xcong/excoin/utils/ThreadPoolUtils.java index dfc37dc..166ff77 100644 --- a/src/main/java/com/xcong/excoin/utils/ThreadPoolUtils.java +++ b/src/main/java/com/xcong/excoin/utils/ThreadPoolUtils.java @@ -20,6 +20,7 @@ import com.xcong.excoin.rabbit.pricequeue.whole.WholePriceDataModel; import com.xcong.excoin.rabbit.producer.OrderProducer; import com.xcong.excoin.utils.dingtalk.DingTalkUtils; +import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import javax.validation.constraints.NotNull; @@ -108,8 +109,24 @@ * @param memberId */ public static void sendWholePrice(@NotNull Long memberId) { - log.info("全仓操作价格"); - OrderProducer orderProducer = SpringContextHolder.getBean(OrderProducer.class); - orderProducer.sendWholePrice(memberId.toString()); + EXECUTOR.execute(new Runnable() { + @SneakyThrows + @Override + public void run() { + Thread.sleep(500); + log.info("全仓操作价格"); + OrderProducer orderProducer = SpringContextHolder.getBean(OrderProducer.class); + orderProducer.sendWholePrice(memberId.toString()); + } + }); + } + + public static void sendOrderMsg() { + EXECUTOR.execute(new Runnable() { + @Override + public void run() { + DingTalkUtils.sendOrderMsg(); + } + }); } } -- Gitblit v1.9.1