| | |
| | | import com.yami.trading.common.util.StringUtils; |
| | | import com.yami.trading.dao.user.WithdrawMapper; |
| | | import com.yami.trading.service.*; |
| | | import com.yami.trading.service.notify.WalletTransactionMailNotificationService; |
| | | import com.yami.trading.service.syspara.SysparaService; |
| | | import com.yami.trading.service.system.LogService; |
| | | import com.yami.trading.service.system.TipService; |
| | |
| | | WalletLogService walletLogService; |
| | | @Autowired |
| | | LogService logService; |
| | | @Autowired |
| | | private WalletTransactionMailNotificationService walletTransactionMailNotificationService; |
| | | |
| | | @Override |
| | | public Page listRecord(Page page, String status, String roleName, |
| | |
| | | log.setLog("通过提现申请。订单号[" + withdraw.getOrderNo() + "]。"); |
| | | logService.save(log); |
| | | tipService.deleteTip(withdraw.getUuid().toString()); |
| | | String asset = symbol.toUpperCase(); |
| | | walletTransactionMailNotificationService.sendWithdrawSuccess( |
| | | user, |
| | | withdraw.getOrderNo(), |
| | | withdraw.getAmount(), |
| | | withdraw.getAmountFee(), |
| | | asset); |
| | | } |
| | | } |
| | | |
| | |
| | | if (party_kyc==null){ |
| | | party_kyc=new RealNameAuthRecord(); |
| | | } |
| | | if (!(party_kyc.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | throw new YamiShopBindException("未基础认证"); |
| | | if ("true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | realNameAuthRecordService.requireApproved(party, false); |
| | | } |
| | | 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 |
| | |
| | | if (party_kyc==null){ |
| | | party_kyc=new RealNameAuthRecord(); |
| | | } |
| | | if (!(party_kyc.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | throw new YamiShopBindException("未基础认证"); |
| | | if ("true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | realNameAuthRecordService.requireApproved(party, false); |
| | | } |
| | | if (party_kycHighLevel==null){ |
| | | party_kycHighLevel=new HighLevelAuthRecord(); |
| | |
| | | |
| | | @Override |
| | | public void applyWithdraw(Withdraw withdraw, User user) { |
| | | if (user.getAccountType() != null && user.getAccountType() == 1) { |
| | | throw new YamiShopBindException("模拟账户不支持提现"); |
| | | } |
| | | String channel = withdraw.getMethod(); |
| | | BigDecimal amount = withdraw.getAmount(); |
| | | String symbol = "btc"; |
| | |
| | | throw new YamiShopBindException("无权限"); |
| | | } |
| | | RealNameAuthRecord realNameAuthRecord = realNameAuthRecordService.getByUserId(user.getUserId()); |
| | | if (!(realNameAuthRecord.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | throw new YamiShopBindException("未安全认证,无提现权限"); |
| | | if ("true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) { |
| | | realNameAuthRecordService.requireApproved(user, false); |
| | | } |
| | | HighLevelAuthRecord highLevelAuthRecord = highLevelAuthRecordService.findByUserId(withdraw.getUserId()); |
| | | BigDecimal withdrawByHighKyc = new BigDecimal(sysparaService.find("withdraw_by_high_kyc").getSvalue()); |