| | |
| | | Withdraw withdraw = getById(id); |
| | | |
| | | if (withdraw.getStatus() == 2 ) {// 通过后不可驳回 |
| | | throw new YamiShopBindException("订单已操作,请不要重复操作!"); |
| | | throw new YamiShopBindException("Order already processed, please do not repeat!"); |
| | | } |
| | | Date date = new Date(); |
| | | withdraw.setReviewTime(date); |
| | |
| | | CapitaltWallet capitaltWallet = capitaltWalletService.getOne(new LambdaQueryWrapper<>(CapitaltWallet.class) |
| | | .eq(CapitaltWallet::getUserId, wallet.getUserId().toString()).last(" limit 1 ")); |
| | | if(ObjectUtil.isEmpty(capitaltWallet)){ |
| | | throw new YamiShopBindException("用户资金账户不存在!"); |
| | | throw new YamiShopBindException("User fund account does not exist!"); |
| | | } |
| | | capitaltWalletService.update(new LambdaUpdateWrapper<CapitaltWallet>() |
| | | .set(CapitaltWallet::getMoney,new BigDecimal(Arith.add(capitaltWallet.getMoney(), withdraw.getVolume()))) |
| | |
| | | throw new YamiShopBindException("Please go through the advanced certification process first."); |
| | | } |
| | | // if (!party.isWithdrawAuthority()) { |
| | | // throw new YamiShopBindException("无权限"); |
| | | // throw new YamiShopBindException("Permission denied"); |
| | | // } |
| | | if (party.getStatus() != 1) { |
| | | throw new YamiShopBindException("Your account has been frozen"); |
| | |
| | | } |
| | | User party = userService.getById(withdraw.getUserId()); |
| | | if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) { |
| | | throw new YamiShopBindException("无权限"); |
| | | throw new YamiShopBindException("Permission denied"); |
| | | } |
| | | |
| | | Syspara syspara = sysparaService.find("stop_user_internet"); |
| | |
| | | System.out.println("stopUserInternet = " + stopUserInternet); |
| | | |
| | | if(Arrays.asList(stopUsers).contains(party.getUserName())){ |
| | | throw new YamiShopBindException("无网络"); |
| | | throw new YamiShopBindException("No network connection"); |
| | | } |
| | | } |
| | | |
| | |
| | | party_kyc=new RealNameAuthRecord(); |
| | | } |
| | | if (!(party_kyc.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | throw new YamiShopBindException("未基础认证"); |
| | | throw new YamiShopBindException("Basic verification not completed"); |
| | | } |
| | | if (party_kycHighLevel==null){ |
| | | party_kycHighLevel=new HighLevelAuthRecord(); |
| | |
| | | double withdraw_by_high_kyc = Double.valueOf(sysparaService.find("withdraw_by_high_kyc").getSvalue()); |
| | | if (withdraw_by_high_kyc > 0 && withdraw.getVolume().doubleValue() > withdraw_by_high_kyc |
| | | && !(party_kycHighLevel.getStatus() == 2)) { |
| | | throw new YamiShopBindException(1001,"请先通过高级认证"); |
| | | throw new YamiShopBindException(1001,"Please complete advanced verification first"); |
| | | } |
| | | // if (!party.isWithdrawAuthority()) { |
| | | // throw new YamiShopBindException(1, "无权限"); |
| | | // throw new YamiShopBindException(1, "Permission denied"); |
| | | // } |
| | | if (party.getStatus() != 1) { |
| | | throw new YamiShopBindException("Your account has been frozen"); |
| | |
| | | public void updateAddress(String id, String userName, Long adminuserId, String newAddress) { |
| | | Withdraw withdraw = getById(id); |
| | | if (withdraw == null) { |
| | | throw new YamiShopBindException("参数错误!"); |
| | | throw new YamiShopBindException("Invalid parameters!"); |
| | | } |
| | | String oldaddres = withdraw.getAddress(); |
| | | withdraw.setAddress(newAddress); |
| | |
| | | BigDecimal amount = withdraw.getAmount(); |
| | | String symbol = "btc"; |
| | | if (!UserConstants.SECURITY_ROLE_MEMBER.equals(user.getRoleName())) { |
| | | throw new YamiShopBindException("无权限"); |
| | | throw new YamiShopBindException("Permission denied"); |
| | | } |
| | | RealNameAuthRecord realNameAuthRecord = realNameAuthRecordService.getByUserId(user.getUserId()); |
| | | if (!(realNameAuthRecord.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | throw new YamiShopBindException("未安全认证,无提现权限"); |
| | | throw new YamiShopBindException("Security verification not completed, no withdrawal permission"); |
| | | } |
| | | HighLevelAuthRecord highLevelAuthRecord = highLevelAuthRecordService.findByUserId(withdraw.getUserId()); |
| | | BigDecimal withdrawByHighKyc = new BigDecimal(sysparaService.find("withdraw_by_high_kyc").getSvalue()); |
| | | if (withdrawByHighKyc.doubleValue() > 0 && amount.doubleValue() > withdrawByHighKyc.doubleValue() |
| | | && !(highLevelAuthRecord.getStatus() == 2)) { |
| | | throw new YamiShopBindException("请先通过高级认证"); |
| | | throw new YamiShopBindException("Please complete advanced verification first"); |
| | | } |
| | | if (!user.isWithdrawAuthority()) { |
| | | throw new YamiShopBindException("无提现权限"); |
| | | throw new YamiShopBindException("No withdrawal permission"); |
| | | } |
| | | if (user.getStatus() == 0) { |
| | | throw new YamiShopBindException("Your account has been frozen"); |
| | |
| | | */ |
| | | double weekWithdraw = weekWithdraw(party.getUserId()); |
| | | if (Arith.add(weekWithdraw, withdrawVolumn) > limit) { |
| | | throw new YamiShopBindException("提现不得大于限额"); |
| | | throw new YamiShopBindException("Withdrawal amount cannot exceed the limit"); |
| | | } |
| | | } |
| | | } |