Helius
2021-05-20 dbee929294fc8b3bb8ff7c721023de4f57c89996
src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
@@ -73,8 +73,12 @@
            throw new GlobalException("低于最低限额");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMaxAmount()) > 0) {
        if (orderAddDto.getCnyAmount().compareTo(entrustOrder.getLimitMaxAmount()) > 0) {
            throw new GlobalException("高于最高限额");
        }
        if (orderAddDto.getCnyAmount().compareTo(entrustOrder.getRemainCoinAmount()) > 0) {
            throw new GlobalException("剩余数量不足");
        }
        BigDecimal cny = orderAddDto.getUsdtAmount().multiply(entrustOrder.getUnitPrice());
@@ -116,14 +120,18 @@
            throw new GlobalException("无法出售");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMinAmount()) < 0) {
        if (orderAddDto.getCnyAmount().compareTo(entrustOrder.getLimitMinAmount()) < 0) {
            throw new GlobalException("低于最低限额");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMaxAmount()) > 0) {
        if (orderAddDto.getCnyAmount().compareTo(entrustOrder.getLimitMaxAmount()) > 0) {
            throw new GlobalException("高于最高限额");
        }
        if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getRemainCoinAmount()) > 0) {
            throw new GlobalException("剩余数量不足");
        }
        if (StrUtil.isBlank(orderAddDto.getPassword())) {
            throw new GlobalException("资金密码不能为空");
        }