| | |
| | | throw new GlobalException("资金密码错误"); |
| | | } |
| | | |
| | | BigDecimal cny = orderAddDto.getUsdtAmount().multiply(entrustOrder.getUnitPrice()); |
| | | BigDecimal cny = orderAddDto.getUsdtAmount().multiply(entrustOrder.getUnitPrice()).setScale(2, BigDecimal.ROUND_DOWN); |
| | | BigDecimal usdt = orderAddDto.getCnyAmount().divide(entrustOrder.getUnitPrice(), 2, BigDecimal.ROUND_DOWN); |
| | | if (cny.compareTo(orderAddDto.getCnyAmount()) != 0 && usdt.compareTo(orderAddDto.getUsdtAmount()) != 0) { |
| | | log.info("SALE = CNY:{}, CNY_{}, USDT:{}, USDT_{}", cny, orderAddDto.getCnyAmount(), usdt, orderAddDto.getUsdtAmount()); |