| | |
| | | throw new GlobalException("无法购买"); |
| | | } |
| | | |
| | | if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getRemainCoinAmount()) > 0) { |
| | | throw new GlobalException("无足够的USDT"); |
| | | } |
| | | |
| | | if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getLimitMinAmount()) < 0) { |
| | | if (orderAddDto.getCnyAmount().compareTo(entrustOrder.getLimitMinAmount()) < 0) { |
| | | throw new GlobalException("低于最低限额"); |
| | | } |
| | | |
| | |
| | | throw new GlobalException("高于最高限额"); |
| | | } |
| | | |
| | | if (orderAddDto.getCnyAmount().compareTo(entrustOrder.getRemainCoinAmount()) > 0) { |
| | | if (orderAddDto.getUsdtAmount().compareTo(entrustOrder.getRemainCoinAmount()) > 0) { |
| | | throw new GlobalException("剩余数量不足"); |
| | | } |
| | | |