新版仿ok交易所-后端
1
zj
19 hours ago 640ccb9229224642515527daf87f308a7aa9bdf4
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiFuturesOrderController.java
@@ -75,7 +75,7 @@
        Map<String, Object> data = new HashMap<>();
        Item bySymbol = itemService.findBySymbol(symbol);
        if(bySymbol == null){
            throw new YamiShopBindException("当前币对不存在");
            throw new YamiShopBindException("Trading pair does not exist");
        }
        List<Map<String,Object>> futuresParas = new ArrayList<>();
        for (FuturesPara para : this.futuresParaService.getBySymbolSort(symbol)) {
@@ -142,19 +142,19 @@
    public Result<Map<String, String>> open(FutureOpenAction futureOpenAction) {
        Item bySymbol = itemService.findBySymbol(futureOpenAction.getSymbol());
        if(bySymbol == null){
            throw  new YamiShopBindException("当前币对不存在");
            throw new YamiShopBindException("Trading pair does not exist");
        }
        if (!itemService.isContractTrading(bySymbol)) {
            throw new YamiShopBindException("未开放合约交易");
            throw new YamiShopBindException("Contract trading is not enabled");
        }
        /*if (itemService.isSuspended(bySymbol.getSymbol())) {
            throw new YamiShopBindException("停牌禁止交易");
            throw new YamiShopBindException("Trading suspended");
        }*/
        boolean isOpen = MarketOpenChecker.isMarketOpenByItemCloseType(bySymbol.getOpenCloseType());
        if(!isOpen){
            throw  new YamiShopBindException("当前已经休市");
            throw new YamiShopBindException("Market is currently closed");
        }
        String partyId = SecurityUtils.getUser().getUserId();
        boolean lock = false;
@@ -163,7 +163,7 @@
            Map<String, String> data = new HashMap<String, String>();
            if (!FuturesLock.add(partyId)) {
                throw new YamiShopBindException("请稍后再试");
                throw new YamiShopBindException("Please try again later");
            }
            lock = true;
@@ -240,7 +240,7 @@
        FuturesOrder order = this.futuresOrderService.cacheByOrderNo(order_no);
        if (null == order) {
            log.info("futuresOrder!get order_no:" + order_no + ", order null");
            throw new YamiShopBindException("订单不存在");
            throw new YamiShopBindException("Order does not exist");
        }
        return Result.succeed(this.futuresOrderService.bulidOne(order));
    }