| | |
| | | import cc.mrbird.febs.dapp.entity.*; |
| | | import cc.mrbird.febs.dapp.mapper.*; |
| | | import cc.mrbird.febs.dapp.service.DappWalletService; |
| | | import cc.mrbird.febs.dapp.utils.BoxUtil; |
| | | import cc.mrbird.febs.dapp.vo.WalletInfoVo; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | idoAssets.setBoxCnt(idoAssets.getBoxCnt() - 1); |
| | | dappIdoAssetsDao.updateById(idoAssets); |
| | | |
| | | // TODO 线上转账 |
| | | BoxUtil.Box box = BoxUtil.openBox(); |
| | | |
| | | return 1; |
| | | DappFundFlowEntity boxFundFlow = new DappFundFlowEntity(member.getId(), new BigDecimal(box.getIndex()), 6, 2, BigDecimal.ZERO); |
| | | dappFundFlowDao.insert(boxFundFlow); |
| | | |
| | | new Thread(() -> { |
| | | int count = box.getIndex(); |
| | | while(count > 0) { |
| | | ChainService.getInstance(ChainEnum.BSC_NFT_SDC.name()).safeMintNFT(member.getAddress()); |
| | | count--; |
| | | } |
| | | }).start(); |
| | | |
| | | return box.getIndex(); |
| | | } |
| | | } |