From 011f596d2a72c8532940d4d1033a3da52df76f57 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 03 Aug 2020 15:53:39 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java b/src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java
index 58fee8e..467c1ec 100644
--- a/src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java
@@ -178,7 +178,7 @@
                             if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) {
                                 profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam()));
                             } else {
-                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
+//                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
                             }
                         }
                         //回报率
@@ -268,7 +268,7 @@
                             if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) {
                                 profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam()));
                             } else {
-                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
+//                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
                             }
                         }
                         //回报率
@@ -278,7 +278,7 @@
                         contractOrderEntity.setClosingFeeAmount(order.getOpeningFeeAmount());
                         contractOrderEntity.setClosingPrice(closePrice);
                         contractOrderEntity.setClosingType(7);
-                        contractOrderEntity.setOrderType(ContractOrderEntity.ORDER_TYPE_CLOSE_MORE);
+                        contractOrderEntity.setOrderType(ContractOrderEntity.ORDER_TYPE_CLOSE_LESS);
                         BigDecimal totalReturn = BigDecimal.ZERO;
                         contractOrderService.save(contractOrderEntity);
 
@@ -360,7 +360,7 @@
                             if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) {
                                 profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam()));
                             } else {
-                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
+//                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
                             }
                         }
                         //回报率
@@ -451,7 +451,7 @@
                             if (profitLossPrice.compareTo(BigDecimal.ZERO) > 0) {
                                 profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.subtract(tradeSetting.getProfitParam()));
                             } else {
-                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
+//                                profitLossPrice = profitLossPrice.multiply(BigDecimal.ONE.add(tradeSetting.getProfitParam()));
                             }
                         }
                         //回报率
@@ -671,11 +671,9 @@
         String[] referenceIds = member.getRefererIds().split(",");
         List<String> ids = Arrays.asList(referenceIds);
 
-        log.info("---->{}", member.getAccountType());
         if (MemberEntity.ACCOUNT_TYPE_TEST.equals(member.getAccountType())) {
             return;
         }
-        log.info("--->--->");
 
         // 判断该用户是否为代理商
         NeedMoneyMemberVo needMoneyMember = memberService.selectFriendRelationUserByMemberId(mid);

--
Gitblit v1.9.1