| | |
| | | import cc.mrbird.febs.dapp.utils.BoxUtil; |
| | | import cc.mrbird.febs.dapp.vo.ActiveNftListVo; |
| | | import cc.mrbird.febs.dapp.vo.WalletInfoVo; |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateField; |
| | | import cn.hutool.core.date.DateUnit; |
| | |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | private final DappSystemService dappSystemService; |
| | | private final DappNftActivationDao dappNftActivationDao; |
| | | |
| | | private final ChainProducer chainProducer; |
| | | |
| | | @Override |
| | | public WalletInfoVo walletInfo() { |
| | |
| | | walletCoin.setAvailableAmount(walletCoin.getAvailableAmount().subtract(transferDto.getAmount())); |
| | | |
| | | dappWalletCoinDao.updateById(walletCoin); |
| | | |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), transferDto.getAmount(), 1, 2, transferDto.getFee(), transferDto.getTxHash()); |
| | | dappFundFlowDao.insert(fundFlow); |
| | | |
| | | chainProducer.sendAchieveTreeMsg(member.getId()); |
| | | } else { |
| | | if (transferDto.getId() == null) { |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), transferDto.getAmount(), transferDto.getType(), 1, transferDto.getFee(), transferDto.getTxHash()); |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), transferDto.getAmount(), 1, 1, transferDto.getFee(), transferDto.getTxHash()); |
| | | dappFundFlowDao.insert(fundFlow); |
| | | return fundFlow.getId(); |
| | | } |