Helius
2021-05-20 01e17b3054836eedfbb3ef5b756b0e3a237823f3
src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
@@ -69,8 +69,15 @@
            throw new GlobalException("无足够的USDT");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMinAmount()) < 0) {
            throw new GlobalException("低于最低限额");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMaxAmount()) > 0) {
            throw new GlobalException("高于最高限额");
        }
        BigDecimal cny = orderAddDto.getUsdtAmount().multiply(entrustOrder.getUnitPrice());
        log.info("--->{}", cny);
        if (cny.compareTo(orderAddDto.getCnyAmount()) != 0) {
            throw new GlobalException("数量与金额不符");
        }
@@ -109,6 +116,14 @@
            throw new GlobalException("无法出售");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMinAmount()) < 0) {
            throw new GlobalException("低于最低限额");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMaxAmount()) > 0) {
            throw new GlobalException("高于最高限额");
        }
        if (StrUtil.isBlank(orderAddDto.getPassword())) {
            throw new GlobalException("资金密码不能为空");
        }