新版仿ok交易所-后端
1
zj
7 hours ago b28a97e1bf66e3279e78f31ce58122427787ceec
trading-order-service/src/main/java/com/yami/trading/service/exchange/impl/ExchangeApplyOrderServiceImpl.java
@@ -142,14 +142,14 @@
        boolean order_open = sysparaService.find("exchange_order_open").getBoolean();
        if (!order_open) {
            throw new YamiShopBindException("不在交易时段");
            throw new YamiShopBindException("Outside trading hours");
        }
        Item item = itemService.findBySymbol(order.getSymbol());
        if (item == null) {
            throw new YamiShopBindException("参数错误");
            throw new YamiShopBindException("Invalid parameters");
        }
        /*if (itemService.isSuspended(order.getSymbol())) {
            throw new YamiShopBindException("停牌禁止交易");
            throw new YamiShopBindException("Trading suspended");
        }*/
@@ -654,7 +654,7 @@
            System.out.println("-----userIdWallet---------:"+userIdWallet.getMoney().doubleValue());
            System.out.println("-----order---------:"+order.getVolume().doubleValue());
            if (userIdWallet.getMoney().doubleValue() < order.getVolume().doubleValue()) {
                throw new YamiShopBindException("余额不足");
                throw new YamiShopBindException("Insufficient balance");
            }
//            this.walletService.update(userIdWallet.getUserId().toString(), Arith.sub(0, order.getVolume()));
            capitaltWalletService.update(userIdWallet, Arith.sub(0, order.getVolume()));
@@ -711,7 +711,7 @@
        }
        if (!order.isTriggerOrder()) {
            if (order.getVolume() > walletExtend.getAmount()) {
                throw new YamiShopBindException("仓位不足");
                throw new YamiShopBindException("Insufficient position");
            }
            walletService.updateExtend(walletExtend.getPartyId().toString(), walletExtend.getWallettype(),
                    Arith.sub(0, order.getVolume()));