| | |
| | | Withdraw withdraw = getById(id); |
| | | |
| | | if (withdraw.getStatus() == 2 ) {// 通过后不可驳回 |
| | | return; |
| | | throw new YamiShopBindException("订单已操作,请不要重复操作!"); |
| | | } |
| | | Date date = new Date(); |
| | | withdraw.setReviewTime(date); |
| | |
| | | throw new YamiShopBindException("用户资金账户不存在!"); |
| | | } |
| | | capitaltWalletService.update(new LambdaUpdateWrapper<CapitaltWallet>() |
| | | .set(CapitaltWallet::getMoney,new BigDecimal(Arith.add(capitaltWallet.getMoney().doubleValue(), amount_before))) |
| | | .set(CapitaltWallet::getMoney,new BigDecimal(Arith.add(capitaltWallet.getMoney(), withdraw.getVolume()))) |
| | | .eq(CapitaltWallet::getUserId,wallet.getUserId())); |
| | | |
| | | |
| | |
| | | } else if (channel.indexOf("ETH") != -1) { |
| | | saveApplyOtherChannel(withdraw, "ethusdt"); |
| | | return; |
| | | }else if(channel.indexOf("USDC") != -1){ |
| | | saveApplyOtherChannel(withdraw, "usdcusdt"); |
| | | return; |
| | | } |
| | | User party = userService.getById(withdraw.getUserId()); |
| | | if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) { |
| | |
| | | if(ObjectUtil.isEmpty(capitaltWallet)){ |
| | | throw new YamiShopBindException("The user's funds account does not exist!"); |
| | | } |
| | | capitaltWalletService.update(capitaltWallet,-withdraw.getAmount().doubleValue()); |
| | | capitaltWalletService.update(capitaltWallet,-withdraw.getVolume().doubleValue()); |
| | | |
| | | save(withdraw); |
| | | |