| | |
| | | import project.log.MoneyLogService; |
| | | import project.party.PartyService; |
| | | import project.party.model.Party; |
| | | import project.redis.RedisHandler; |
| | | import project.syspara.Syspara; |
| | | import project.syspara.SysparaService; |
| | | import project.tip.TipConstants; |
| | | import project.tip.TipService; |
| | | import project.user.UserDataService; |
| | | import project.wallet.Wallet; |
| | | import project.wallet.WalletExtend; |
| | | import project.wallet.WalletLog; |
| | | import project.wallet.WalletLogService; |
| | | import project.wallet.WalletService; |
| | | import project.wallet.*; |
| | | import project.wallet.internal.WalletGatherServiceImpl; |
| | | import project.wallet.rate.ExchangeRateService; |
| | | import security.SecUser; |
| | | import security.internal.SecUserService; |
| | |
| | | protected SysparaService sysparaService; |
| | | protected ChannelBlockchainService channelBlockchainService; |
| | | protected TipService tipService; |
| | | protected RedisHandler redisHandler; |
| | | |
| | | @Override |
| | | public void save(RechargeBlockchain recharge) { |
| | |
| | | if (recharge.getSucceeded() == 1) { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | recharge.setReviewTime(new Date()); |
| | | recharge.setSucceeded(1); |
| | | |
| | |
| | | log.setUsername(secUser.getUsername()); |
| | | log.setPartyId(recharge.getPartyId()); |
| | | log.setCreateTime(new Date()); |
| | | log.setLog("管理员修改充值数量,原充值数量[" |
| | | + recharge.getVolume() + "],修改后充值数量[" + success_amount + "]。订单号[" + order_no+ "]。"); |
| | | log.setLog("管理员修改充值数量,原充值数量[" |
| | | + recharge.getVolume() + "],修改后充值数量[" + success_amount + "]。订单号[" + order_no+ "]。"); |
| | | |
| | | logService.saveSync(log); |
| | | walletLog.setAmount(success_amount); |
| | |
| | | |
| | | Wallet wallet = new Wallet(); |
| | | wallet = walletService.saveWalletByPartyId(recharge.getPartyId()); |
| | | |
| | | |
| | | double amount_before = wallet.getMoney(); |
| | | |
| | | |
| | | walletService.update(wallet.getPartyId().toString(), amount); |
| | | |
| | | // 保存资金日志 |
| | |
| | | |
| | | double amount_before = walletExtend.getAmount(); |
| | | |
| | | // walletExtend = walletService.saveWalletExtendByParaAndUpdate(String.valueOf(recharge.getPartyId()), recharge.getSymbol(), volume); |
| | | // walletExtend = walletService.saveWalletExtendByParaAndUpdate(String.valueOf(recharge.getPartyId()), recharge.getSymbol(), volume); |
| | | walletService.updateExtend(walletExtend.getPartyId().toString(), walletExtend.getWallettype(), volume); |
| | | this.updateRechargeBlockchain(recharge); |
| | | |
| | | |
| | | // 币种usdt价格= 币种价格×充值数量 |
| | | double usdt_amount = Arith.mul(volume, transfer_usdt); |
| | | |
| | | |
| | | // 保存资金日志 |
| | | MoneyLog moneyLog = new MoneyLog(); |
| | | moneyLog.setCategory(Constants.MONEYLOG_CATEGORY_COIN); |
| | |
| | | this.tipService = tipService; |
| | | } |
| | | |
| | | public void setRedisHandler(RedisHandler redisHandler) { |
| | | this.redisHandler = redisHandler; |
| | | } |
| | | |
| | | } |