新版仿ok交易所-后端
1
zj
2025-10-30 14c1946eae86a86f8d1edee6cf3bdaf7572fc966
trading-order-service/src/main/java/com/yami/trading/service/contract/ContractApplyOrderService.java
@@ -241,7 +241,8 @@
        Wallet wallet = this.walletService.findByUserId(order.getPartyId());
        BigDecimal amountBefore = wallet.getMoney();
        BigDecimal totalAmountCost = order.getDeposit().add(order.getFee());
        log.info("amountBefore:"+amountBefore);
        log.info("totalAmountCost:"+totalAmountCost);
        if (amountBefore.compareTo(totalAmountCost) < 0) {
            throw new YamiShopBindException("not sufficient funds");
        }
@@ -378,4 +379,12 @@
        return list(queryWrapper);
    }
    public static void main(String[] args) {
        System.out.println();
        if (new BigDecimal("1432.34").compareTo(new BigDecimal("1432.34")) < 0) {
            throw new YamiShopBindException("not sufficient funds");
        }
    }
}