新版仿ok交易所-后端
zyy
2026-01-04 7295334ff00457c111484d2f021a9c33bbf4a5f2
trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiExchangeApplyOrderController.java
@@ -7,6 +7,7 @@
import com.yami.trading.bean.exchange.ExchangeApplyOrder;
import com.yami.trading.bean.exchange.dto.ExchangeSymbolDto;
import com.yami.trading.bean.exchange.dto.SumEtfDto;
import com.yami.trading.bean.item.domain.Item;
import com.yami.trading.bean.model.*;
import com.yami.trading.bean.purchasing.dto.ExchangeLock;
import com.yami.trading.bean.syspara.domain.Syspara;
@@ -255,7 +256,7 @@
            if (symbol_price == 0) {
                symbol_price = 1;
            }
            data.put("get_rate", Arith.div(symbol_price, symbol_to_price, 5));
            data.put("get_rate", Arith.div(symbol_price, symbol_to_price, 8));
            // 总手续费比例
            double all_fee = Arith.add(buy_fee, sell_fee);
            // 实际兑换数量= 兑换数量-手续费数量
@@ -263,7 +264,7 @@
            // 实际价值 = 实际兑换数量 * 被兑换品种价格
            double fact_price = Arith.mul(fact_volume, symbol_price);
            // 实际获取数量 = 实际价值 / 将要兑换的品种的价值
            data.put("get_volume", Arith.div(fact_price, symbol_to_price, 5));
            data.put("get_volume", Arith.div(fact_price, symbol_to_price, 8));
        }
        return data;
    }
@@ -402,6 +403,8 @@
            String session_token = sessionTokenService.savePut(partyId);
            data.put("session_token", session_token);
            data.put("fee", sysparaService.find("exchange_apply_order_sell_fee").getSvalue());
            Item item = itemService.findCurrBySymbol(symbol);
            data.put("status", item.getStatus() == null || item.getStatus() == 1 ? 1 :0);
        }
        return Result.succeed(data);
    }