From 05c74ca131add20dbcf23dc109e63c21b3e2be29 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 24 Feb 2021 18:11:57 +0800
Subject: [PATCH] Merge branch 'whole_new_trc20' into whole_new
---
src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
index 6e6f09f..7e50874 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
@@ -151,6 +151,7 @@
BigDecimal prePaymentAmount = bondAmount.add(openFeePrice).add(openFeePrice);
if (prePaymentAmount.compareTo(walletContract.getAvailableBalance()) > -1) {
log.info("可用金额不足");
+ LogRecordUtils.insertFollowerNotice(followerSetting.getMemberId(), NoticeConstant.MONEY_NOT_ENOUGH_TITLE, StrUtil.format(NoticeConstant.MONEY_NOT_ENOUGH_CONTENT, followTraderInfoEntity.getNickname()));
continue;
}
@@ -164,6 +165,7 @@
followHoldOrder.setTradeType(ContractHoldOrderEntity.TRADE_TYPE_MARK);
followHoldOrder.setSymbol(holdOrderEntity.getSymbol());
followHoldOrder.setSymbolCnt(symbolCnt);
+ followHoldOrder.setSymbolCntSale(symbolCnt);
followHoldOrder.setSymbolSku(lotNumber);
followHoldOrder.setLeverRatio(levelRateEntity.getLevelRateUp());
followHoldOrder.setForceClosingPrice(forceClosingPrice);
@@ -196,7 +198,7 @@
followFollowerOrderRelationDao.insert(relationEntity);
// 发送爆仓消息
- sendOrderBombMsg(holdOrderEntity.getId(), holdOrderEntity.getOpeningType(), forceClosingPrice, holdOrderEntity.getSymbol(), holdOrderEntity.getOperateNo());
+ sendOrderBombMsg(followHoldOrder.getId(), followHoldOrder.getOpeningType(), forceClosingPrice, followHoldOrder.getSymbol(), followHoldOrder.getOperateNo(), followHoldOrder.getMemberId());
// 计算佣金
ThreadPoolUtils.calReturnMoney(memberEntity.getId(), contractOrderEntity.getOpeningFeeAmount(), contractOrderEntity, AgentReturnEntity.ORDER_TYPE_OPEN);
@@ -214,14 +216,14 @@
}
}
- public void sendOrderBombMsg(Long id, int type, BigDecimal forceClosingPrice, String symbol, int operateNo) {
+ public 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);
}
producer.sendPriceOperate(JSONObject.toJSONString(model));
}
--
Gitblit v1.9.1