| | |
| | | package com.yami.trading.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | @Autowired |
| | | SysparaService sysparaService; |
| | | |
| | | @Autowired |
| | | CapitaltWalletService capitaltWalletService; |
| | | |
| | | @Autowired |
| | | WalletLogService walletLogService; |
| | |
| | | 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) { |
| | |
| | | if ("usdt".equals(recharge.getSymbol())) { |
| | | double amount1 = recharge.getVolume(); |
| | | |
| | | Wallet wallet = new Wallet(); |
| | | wallet = walletService.saveWalletByPartyId(recharge.getPartyId()); |
| | | // Wallet wallet = new Wallet(); |
| | | // wallet = walletService.saveWalletByPartyId(recharge.getPartyId()); |
| | | // |
| | | // double amount_before = wallet.getMoney().doubleValue(); |
| | | // |
| | | // walletService.update(wallet.getUserId(), amount1); |
| | | |
| | | double amount_before = wallet.getMoney().doubleValue(); |
| | | |
| | | walletService.update(wallet.getUserId(), amount1); |
| | | CapitaltWallet capitaltWallet = capitaltWalletService.getOne(new LambdaQueryWrapper<>(CapitaltWallet.class) |
| | | .eq(CapitaltWallet::getUserId, recharge.getPartyId()).last(" limit 1 ")); |
| | | double amount_before = capitaltWallet.getMoney().doubleValue(); |
| | | capitaltWalletService.update(capitaltWallet,amount1); |
| | | |
| | | // 保存资金日志 |
| | | MoneyLog moneyLog = new MoneyLog(); |