From 1fc98d66589965b5b10e09334f715b28ed5ab455 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 08 Sep 2020 10:33:47 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java b/src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java index 0d302c2..5d90b5e 100644 --- a/src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java +++ b/src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java @@ -1,6 +1,7 @@ package com.xcong.excoin.rabbit.pricequeue; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.xcong.excoin.common.contants.AppContants; import com.xcong.excoin.common.enumerates.CoinTypeEnum; @@ -309,9 +310,15 @@ OrderModel orderModel = new OrderModel(null, 0, price, symbol, memberId); list.add(orderModel); String content = JSONObject.toJSONString(list); - orderProducer.sendWholeBomb(content); - contractHoldOrderDao.updateMemberAllHoldOrderClosingStatus(memberId); + String key = AppContants.WHOLE_BOMB_PREFIX + memberId; + String value = redisUtils.getString(key); + if (StrUtil.isBlank(value)) { + orderProducer.sendWholeBomb(content); + contractHoldOrderDao.updateMemberAllHoldOrderClosingStatus(memberId); + + redisUtils.set(key, memberId); + } } } } -- Gitblit v1.9.1