新版仿ok交易所-后端
1
zj
yesterday 640ccb9229224642515527daf87f308a7aa9bdf4
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");
        }*/
@@ -536,12 +536,14 @@
        }
        for (ExchangeRecord entry : recordMap.values()) {
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("symbol", entry.getSymbol());
            //map.put("symbol", entry.getSymbol());
            map.put("symbol", entry.getSymbol().equalsIgnoreCase("galausdt") ? "dxcmusdt" : entry.getSymbol());
            Item bySymbol = itemService.findBySymbol(entry.getSymbol());
            if (bySymbol != null) {
                map.put("symbol_data", bySymbol.getSymbolData());
            }
            map.put("symbol_to", entry.getSymbol_to());
            map.put("symbol_to", entry.getSymbol_to().equalsIgnoreCase("galausdt") ? "dxcmusdt" : entry.getSymbol_to());
            //map.put("symbol_to", entry.getSymbol_to());
            map.put("amount", entry.getAmount());
            map.put("amount_to", entry.getAmount_to());
            map.put("create_time", entry.getCreate_time());
@@ -652,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()));
@@ -709,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()));