Helius
2021-02-02 49e8cba7521d41f72bf280110b78ef6f1dff4aa8
modify
1 files modified
16 ■■■■■ changed files
src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java
@@ -339,12 +339,16 @@
                    continue;
                }
                dataModelMap.remove(entry.getKey());
                redisUtils.set(AppContants.WHOLE_BOMB_MAP, JSONObject.toJSONString(dataModelMap));
                log.info("全仓爆仓触发:{}", JSONObject.toJSONString(wholePriceData));
                wholePriceData.setPrices(prices);
                contractHoldOrderDao.updateMemberAllHoldOrderClosingStatus(wholePriceData.getMemberId());
                orderProducer.sendWholeBomb(JSONObject.toJSONString(wholePriceData));
                synchronized (this) {
                    if (entry.getKey() != null) {
                        dataModelMap.remove(entry.getKey());
                        redisUtils.set(AppContants.WHOLE_BOMB_MAP, JSONObject.toJSONString(dataModelMap));
                        log.info("全仓爆仓触发:{}", JSONObject.toJSONString(wholePriceData));
                        wholePriceData.setPrices(prices);
                        contractHoldOrderDao.updateMemberAllHoldOrderClosingStatus(wholePriceData.getMemberId());
                        orderProducer.sendWholeBomb(JSONObject.toJSONString(wholePriceData));
                    }
                }
            }
        }
    }