From eb9d939661413fc70975b0a75b44126c257bdc49 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 14 Apr 2021 18:27:43 +0800
Subject: [PATCH] 20210414 测试账号的跟随者不返利给交易员
---
src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java | 9 ++++++---
1 files changed, 6 insertions(+), 3 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 afb362e..3b914bc 100644
--- a/src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java
+++ b/src/main/java/com/xcong/excoin/rabbit/pricequeue/WebsocketPriceService.java
@@ -287,7 +287,6 @@
}
}
- @Transactional(rollbackFor = Exception.class)
public void wholeBomb() {
Map<String, WholePriceDataModel> dataModelMap = WholeDataQueue.MAP;
if (CollUtil.isEmpty(dataModelMap)) {
@@ -339,9 +338,13 @@
continue;
}
- synchronized (this) {
- if (entry.getKey() != null) {
+ log.info("过来过来");
+ synchronized(this) {
+ log.info("爆仓啥的:{}", entry.getKey());
+ boolean b = redisUtils.setNotExist(AppContants.WHOLE_BOMB_PREFIX + entry.getKey(), 1, 5);
+ if (b) {
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);
--
Gitblit v1.9.1