| | |
| | | return baseMapper.listRecord(page, rolename, orderNo, userName, startTime, endTime,status); |
| | | } |
| | | |
| | | //auto 1:自动 2:手动 |
| | | @Override |
| | | @Transactional |
| | | public void manualReceipt(String id, BigDecimal amount,String operator_username) { |
| | | public void manualReceipt(Integer auto ,String id, BigDecimal amount,String operator_username) { |
| | | // Date now = new Date(); |
| | | RechargeBlockchainOrder recharge = getById(id); |
| | | if (recharge == null) { |
| | |
| | | userService.updateById(party); |
| | | |
| | | } else { |
| | | List<Realtime> realtime_list =this.dataService.realtime(recharge.getSymbol()); |
| | | log.error("手动到账realtime_list::"+realtime_list); |
| | | Realtime realtime = null; |
| | | if (realtime_list.size() > 0) { |
| | | realtime = realtime_list.get(0); |
| | | } else { |
| | | throw new YamiShopBindException("系统错误,请稍后重试"); |
| | | } |
| | | // List<Realtime> realtime_list =this.dataService.realtime(recharge.getSymbol()); |
| | | // log.error("手动到账realtime_list::"+realtime_list); |
| | | // Realtime realtime = null; |
| | | // if (realtime_list.size() > 0) { |
| | | // realtime = realtime_list.get(0); |
| | | // } else { |
| | | // throw new YamiShopBindException("系统错误,请稍后重试"); |
| | | // } |
| | | // 对应usdt价格 |
| | | double transfer_usdt = realtime.getClose().doubleValue(); |
| | | // double transfer_usdt = realtime.getClose().doubleValue(); |
| | | |
| | | WalletExtend walletExtend = new WalletExtend(); |
| | | walletExtend = walletService.saveExtendByPara(recharge.getPartyId(), recharge.getSymbol()); |
| | |
| | | updateById(recharge); |
| | | |
| | | // 币种usdt价格= 币种价格×充值数量 |
| | | double usdt_amount = Arith.mul(volume, transfer_usdt); |
| | | // double usdt_amount = Arith.mul(volume, transfer_usdt); |
| | | |
| | | // 保存资金日志 |
| | | MoneyLog moneyLog = new MoneyLog(); |
| | |
| | | */ |
| | | // userDataService.saveBuy(recharge.getPartyId(), recharge.getSymbol(), recharge.getVolume()); |
| | | |
| | | /** |
| | | * 充值到账后给他的代理用户添加奖金 |
| | | */ |
| | | if ("true".equals(user_recom_bonus_open.getSvalue())) { |
| | | |
| | | List<RechargeBlockchainOrder> orders =findByPartyIdAndToday(recharge.getPartyId()); |
| | | rechargeBonusService.saveBounsHandle(recharge, transfer_usdt,orders); |
| | | } |
| | | // /** |
| | | // * 充值到账后给他的代理用户添加奖金 |
| | | // */ |
| | | // if ("true".equals(user_recom_bonus_open.getSvalue())) { |
| | | // |
| | | // List<RechargeBlockchainOrder> orders =findByPartyIdAndToday(recharge.getPartyId()); |
| | | // rechargeBonusService.saveBounsHandle(recharge, transfer_usdt,orders); |
| | | // } |
| | | |
| | | /** |
| | | * 充值到账后给他增加提现流水限制金额 |
| | | */ |
| | | |
| | | /** |
| | | * 充值到账后给他增加提现流水限制金额 充值到账后,当前流水大于提现限制流水时是否重置提现限制流水并将Party表里的当前流水设置清零,1不重置,2重置 |
| | | */ |
| | | String recharge_sucess_reset_withdraw = this.sysparaService.find("recharge_sucess_reset_withdraw") |
| | | .getSvalue(); |
| | | if ("1".equals(recharge_sucess_reset_withdraw)) { |
| | | party.setWithdrawLimitAmount(new BigDecimal(Arith.add(party.getWithdrawLimitAmount().doubleValue(), usdt_amount))); |
| | | if (party.getWithdrawLimitNowAmount().doubleValue() > party.getWithdrawLimitAmount().doubleValue()) { |
| | | party.setWithdrawLimitNowAmount(new BigDecimal(0)); |
| | | } |
| | | } |
| | | if ("2".equals(recharge_sucess_reset_withdraw)) { |
| | | double withdraw_limit_turnover_percent = Double |
| | | .valueOf(sysparaService.find("withdraw_limit_turnover_percent").getSvalue()); |
| | | double party_withdraw = Arith.mul(party.getWithdrawLimitAmount().doubleValue(), withdraw_limit_turnover_percent); |
| | | // /** |
| | | // * 充值到账后给他增加提现流水限制金额 充值到账后,当前流水大于提现限制流水时是否重置提现限制流水并将Party表里的当前流水设置清零,1不重置,2重置 |
| | | // */ |
| | | // String recharge_sucess_reset_withdraw = this.sysparaService.find("recharge_sucess_reset_withdraw") |
| | | // .getSvalue(); |
| | | // if ("1".equals(recharge_sucess_reset_withdraw)) { |
| | | // party.setWithdrawLimitAmount(new BigDecimal(Arith.add(party.getWithdrawLimitAmount().doubleValue(), usdt_amount))); |
| | | // if (party.getWithdrawLimitNowAmount().doubleValue() > party.getWithdrawLimitAmount().doubleValue()) { |
| | | // party.setWithdrawLimitNowAmount(new BigDecimal(0)); |
| | | // } |
| | | // } |
| | | // if ("2".equals(recharge_sucess_reset_withdraw)) { |
| | | // double withdraw_limit_turnover_percent = Double |
| | | // .valueOf(sysparaService.find("withdraw_limit_turnover_percent").getSvalue()); |
| | | // double party_withdraw = Arith.mul(party.getWithdrawLimitAmount().doubleValue(), withdraw_limit_turnover_percent); |
| | | // |
| | | // if (party.getWithdrawLimitNowAmount().doubleValue() >= party_withdraw) { |
| | | // party.setWithdrawLimitAmount(new BigDecimal(usdt_amount)); |
| | | // party.setWithdrawLimitNowAmount(new BigDecimal(0)); |
| | | // } else { |
| | | // party.setWithdrawLimitAmount(new BigDecimal(Arith.add(party.getWithdrawLimitAmount().doubleValue(), usdt_amount))); |
| | | // } |
| | | // } |
| | | |
| | | if (party.getWithdrawLimitNowAmount().doubleValue() >= party_withdraw) { |
| | | party.setWithdrawLimitAmount(new BigDecimal(usdt_amount)); |
| | | party.setWithdrawLimitNowAmount(new BigDecimal(0)); |
| | | } else { |
| | | party.setWithdrawLimitAmount(new BigDecimal(Arith.add(party.getWithdrawLimitAmount().doubleValue(), usdt_amount))); |
| | | } |
| | | } |
| | | |
| | | userService.updateById(party); |
| | | // userService.updateById(party); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | if (!"ETH".equals(recharge.getSymbol().toUpperCase())) { |
| | | ChannelBlockchain channel = channelBlockchainService.findByNameAndCoinAndAdd(recharge.getBlockchainName(), |
| | | recharge.getSymbol(), recharge.getChannelAddress()); |
| | | |
| | | if (channel == null || !recharge.getSymbol().toUpperCase().equals(channel.getCoin().toUpperCase())) { |
| | | throw new YamiShopBindException("充值链错误"); |
| | | } |
| | | } |
| | | // |
| | | // if (!"ETH".equals(recharge.getSymbol().toUpperCase())) { |
| | | // ChannelBlockchain channel = channelBlockchainService.findByNameAndCoinAndAdd(recharge.getBlockchainName(), |
| | | // recharge.getSymbol(), recharge.getChannelAddress()); |
| | | // |
| | | // if (channel == null || !recharge.getSymbol().toUpperCase().equals(channel.getCoin().toUpperCase())) { |
| | | // throw new YamiShopBindException("充值链错误"); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | double recharge_limit_min = Double.valueOf(sysparaService.find("recharge_limit_min").getSvalue()); |