| | |
| | | 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.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | throw new FebsException("存储数量必须是"+bigDecimal+"的整数倍"); |
| | | } |
| | | |
| | | DappStorage dappStorage = dappStorageMapper.selectAmountByAmountDesc(0, 1); |
| | | if(ObjectUtil.isNotEmpty(dappStorage)){ |
| | | if(amount.compareTo(dappStorage.getAmount()) < 0){ |
| | | throw new FebsException("存储数量必须大于:"+dappStorage.getAmount()); |
| | | } |
| | | } |
| | | |
| | | if (ObjectUtil.isEmpty(transferDto.getId())) { |
| | | |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity( |
| | |
| | | DataDictionaryEnum.JI_SHU_CHI.getType(), |
| | | DataDictionaryEnum.JI_SHU_CHI.getCode() |
| | | ).getValue()); |
| | | List<DappStorage> dappStorages = dappStorageMapper.selectListGroupByMemberId(); |
| | | apiIndexInfoVo.setAddressNum(CollUtil.isEmpty(dappStorages) ? 0 : dappStorages.size()); |
| | | |
| | | DappStorage dappStorage = dappStorageMapper.selectOneByCreateTimeDesc(0, 1); |
| | | apiIndexInfoVo.setBuChangDate(ObjectUtil.isEmpty(dappStorage) ? |
| | | DateUtil.offsetDay(new Date(), 1) : DateUtil.offsetDay(dappStorage.getCreateTime(), 1)); |
| | | return apiIndexInfoVo; |
| | | } |
| | | |