新版仿ok交易所-后端
BUG
peter
2025-09-06 b865e7f64ad0a1edf9b795c0e66a1ba13b0d6aca
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractApplyOrderController.java
@@ -110,6 +110,19 @@
        data.put("fee", item.getUnitFee());
        List<ItemLeverageDTO> lLeverageDTO = itemLeverageService.findByItemId(item.getUuid());
        // 对list进行排序,按照lever_rate字段升序排列
        Collections.sort(lLeverageDTO, new Comparator<ItemLeverageDTO>() {
            @Override
            public int compare(ItemLeverageDTO o1, ItemLeverageDTO o2) {
                try {
                    Double rate1 = Double.valueOf(o1.getLeverRate());
                    Double rate2 = Double.valueOf(o2.getLeverRate());
                    return rate1.compareTo(rate2);
                } catch (NumberFormatException e) {
                    return 0;
                }
            }
        });
        data.put("lever", lLeverageDTO);
        String partyId = SecurityUtils.getCurrentUserId();
@@ -264,7 +277,7 @@
    private void checkUserStatus(String partyId) {
        User user = userService.getById(partyId);
        if (!user.isEnabled()) {
            throw new YamiShopBindException("用户已锁定");
            throw new YamiShopBindException("User is locked");
        }
    }
@@ -298,6 +311,7 @@
        order.setOrderPriceType(openAction.getPrice_type());
        order.setState(ContractApplyOrder.STATE_SUBMITTED);
        order.setMoney(openAction.getAmount());
        order.setLocationType(openAction.getLocationType());
        contractApplyOrderService.saveCreate(order);
    }
@@ -318,7 +332,7 @@
        try {
            User user = userService.getById(partyId);
            if (!user.isEnabled()) {
                throw new YamiShopBindException("用户已锁定");
                throw new YamiShopBindException("User is locked");
            }
            Syspara syspara = sysparaService.find("stop_user_internet");