From 056e8200e7c81c66ad8fba43cadab3fce022977a Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 02 Sep 2020 10:08:22 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/utils/CalculateUtil.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/utils/CalculateUtil.java b/src/main/java/com/xcong/excoin/utils/CalculateUtil.java
index 9fe8e31..4e3c023 100644
--- a/src/main/java/com/xcong/excoin/utils/CalculateUtil.java
+++ b/src/main/java/com/xcong/excoin/utils/CalculateUtil.java
@@ -118,13 +118,11 @@
subCnt = maxCnt - holdOrderEntity.getSymbolCntSale();
}
- log.info("--{}, {}, {}, {}", maxCnt, subCnt, openPrice, type);
feeAmount = feeAmount.add(holdOrderEntity.getOpeningFeeAmount());
sku = holdOrderEntity.getSymbolSku();
}
BigDecimal forceSetPrice = BigDecimal.ZERO;
if (subCnt != 0) {
- log.info("--->{}, {}, {}, {}, {}", openPrice, subCnt, sku, type, maxCnt);
forceSetPrice = getForceSetPrice(walletContract.getTotalBalance().subtract(feeAmount), openPrice, subCnt, sku, type, memberEntity);
}
@@ -138,7 +136,8 @@
if (forceSetPrice.compareTo(BigDecimal.ZERO) > 0) {
- sendOrderBombMsg(id, type, forceSetPrice, symbol, operateNo);
+ log.info("id:{}, type:{}, forceSetPrice:{}, symbol:{}, operateNo:{}", id, type, forceSetPrice, symbol, operateNo);
+ sendOrderBombMsg(id, type, forceSetPrice, symbol, operateNo, memberEntity.getId());
}
}
}
@@ -222,14 +221,14 @@
*/
- private static void sendOrderBombMsg(Long id, int type, BigDecimal forceClosingPrice, String symbol, int operateNo) {
+ private static void sendOrderBombMsg(Long id, int type, BigDecimal forceClosingPrice, String symbol, int operateNo, Long memberId) {
OrderModel model = null;
// 开多
if (ContractHoldOrderEntity.OPENING_TYPE_MORE == type) {
- model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, operateNo);
+ model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, operateNo, memberId);
// 开空
} else {
- model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, operateNo);
+ model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, operateNo, memberId);
}
SpringContextHolder.getBean(OrderProducer.class).sendPriceOperate(JSONObject.toJSONString(model));
}
--
Gitblit v1.9.1