新版仿ok交易所-后端
1
zj
2025-10-24 c759b55471f47af64a3c92a3666b0485af77c1ec
trading-order-service/src/main/java/com/yami/trading/service/contract/ContractOrderService.java
@@ -525,9 +525,6 @@
        BigDecimal close = realtime.getClose();
        BigDecimal point = close.subtract(order.getTradeAvgPrice());
        BigDecimal profit = point.multiply(new BigDecimal("0.01")).multiply(order.getVolumeOpen()).setScale(4, BigDecimal.ROUND_DOWN);;
        if(null != order.getProfitLossRatio()   || order.getProfitLossRatio() > 0){
            profit = order.getDepositOpen().multiply(new BigDecimal((order.getProfitLossRatio()/100))).setScale(2, RoundingMode.DOWN);
        }
        BigDecimal rentalProfit = order.getDeposit().add(profit);
        BigDecimal rate = volume.divide(order.getVolumeOpen(), 2, RoundingMode.HALF_UP);
        order.setAmountClose(order.getAmountClose().add(profit));
@@ -587,8 +584,8 @@
                        , Constants.MONEYLOG_CATEGORY_CONTRACT, Constants.WALLET_USDT, Constants.MONEYLOG_CONTENT_FEE, "委托单,订单号[" + f.getOrderNo() + "]"
                );
            }
            //计算强平价格
            getStrongPrice(f,item);
//            //计算强平价格
//            getStrongPrice(f,item);
            update(f);
            refreshOrder(applyOrder, f);
        }else{
@@ -619,8 +616,8 @@
                        , Constants.MONEYLOG_CATEGORY_CONTRACT, Constants.WALLET_USDT, Constants.MONEYLOG_CONTENT_FEE, "委托单,订单号[" + order.getOrderNo() + "]"
                );
            }
            //计算强平价格
            getStrongPrice(order,item);
//            //计算强平价格
//            getStrongPrice(order,item);
            save(order);
            refreshOrder(applyOrder, order);
        }