| | |
| | | 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"); |
| | | } |
| | |
| | | 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"); |
| | | } |
| | | |
| | | } |
| | | } |