From c91253f0c71f420fe681be65575e0b6ff87dc31c Mon Sep 17 00:00:00 2001
From: zainali5120 <512061637@qq.com>
Date: Wed, 07 Oct 2020 09:14:35 +0800
Subject: [PATCH] cpvbug修复

---
 src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java |   63 -------------------------------
 1 files changed, 0 insertions(+), 63 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
index d80a6c6..1a6c516 100644
--- a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
@@ -1043,67 +1043,4 @@
         }
     }
 
-    @Override
-    public void initOrders(String symbol, Integer type, Integer tradeType, BigDecimal price,
-                           BigDecimal amount, BigDecimal entrustAmount) {
-        //获取用户ID
-        Long memberId = 10L;
-        BigDecimal nowPriceinBigDecimal = price;
-        //查询当前价
-        //BigDecimal nowPrice = new BigDecimal(redisUtils.getString(CoinTypeConvert.convertToKey(symbol + "/USDT")));
-
-        // 获取交易管理的杠杠倍率,手续费率等信息,由平台进行设置
-        symbol = symbol.toUpperCase();
-
-        // 手续费用(手续费=建仓价X数量X手续费率)
-        BigDecimal closingPrice = BigDecimal.ZERO;
-
-        // BigDecimal totalPayPricCoin = nowPrice.multiply(amount).add(closingPrice);
-        // 首先将单插入到数据库主表(委托表)
-        // 创建订单
-        OrderCoinsEntity order = new OrderCoinsEntity();
-        //根据委托类型生成不同数据
-        // 如果是限价交易直接插入主表数据
-        order.setMemberId(memberId);
-        order.setOrderNo(generateSimpleSerialno(memberId.toString()));
-        order.setOrderType(type);
-        order.setSymbol(symbol);
-        //order.setMarkPrice(nowPrice);
-
-        // 成交量 先设置为0
-        order.setDealCnt(BigDecimal.ZERO);
-        // 成交价
-        //order.setDealPrice(price);
-        // 成交金额
-        order.setDealAmount(BigDecimal.ZERO);
-        order.setOrderStatus(OrderCoinsEntity.ORDERSTATUS_DODING);
-        order.setTradeType(tradeType);
-        // 手续费
-        order.setFeeAmount(closingPrice);
-        if (OrderCoinsEntity.TRADETYPE_FIXEDPRICE.equals(tradeType)) {
-            // 限价 是需要价格和数量 可以得到成交金额
-            // 下单量
-            order.setEntrustCnt(amount);
-            // 下单价格
-            order.setEntrustPrice(price);
-            order.setEntrustAmount(amount.multiply(price));
-        } else {
-            if (OrderCoinsEntity.ORDERTYPE_BUY.equals(type)) {
-                // 市价 只有金额
-                order.setEntrustAmount(entrustAmount);
-            } else {
-                // 下单量
-                order.setEntrustCnt(amount);
-                // 下单价格
-                order.setEntrustPrice(price);
-                order.setEntrustAmount(amount.multiply(price));
-            }
-
-        }
-        orderCoinsDao.insert(order);
-        // 加入到撮合
-        CoinTrader trader = factory.getTrader(symbol);
-        trader.trade(order);
-    }
-
 }

--
Gitblit v1.9.1