fix
Helius
2022-08-26 46ac4d050555284a752acbaabe6a71d13b2f3b2a
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -18,6 +18,7 @@
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;
@@ -54,6 +55,8 @@
    private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
    private final DappSystemService dappSystemService;
    private final DappNftActivationDao dappNftActivationDao;
    private final ChainProducer chainProducer;
    @Override
    public WalletInfoVo walletInfo() {
@@ -229,9 +232,14 @@
            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();
            }