Helius
2021-02-03 4b8f7eb7057b6f0b6abc26effa5956e1d6589b26
src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java
@@ -339,12 +339,18 @@
                    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) {
                    log.info("爆仓啥的:{}", entry.getKey());
                    if (entry.getKey() != null) {
                        dataModelMap.remove(entry.getKey());
                        wholePriceData.setEquity(wholePriceData.getBalance().add(totalProfitOrLoss));
                        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));
                    }
                }
            }
        }
    }