KKSU
2024-07-08 2acacb36ca388b62c75d68739e1eaba5b2958445
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -18,6 +18,7 @@
import cc.mrbird.febs.dapp.vo.*;
import cc.mrbird.febs.rabbit.producer.ChainProducer;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@@ -245,14 +246,18 @@
        if(BigDecimal.ZERO.compareTo(usdtBalance) >= 0){
            throw new FebsException("额度不足");
        }
        if(BigDecimal.ZERO.compareTo(withdrawDto.getAmount()) >= 0){
            throw new FebsException("请输入正确的数量");
        }
        if(withdrawDto.getAmount().compareTo(usdtBalance) > 0){
            throw new FebsException("额度不足");
        }
        List<MemberCoinWithdrawEntity> memberCoinWithdrawEntities = memberCoinWithdrawDao.selectListByDate(member.getId(),new Date());
        if(CollUtil.isNotEmpty(memberCoinWithdrawEntities)){
            throw new FebsException("今日已提现");
        }
//        List<MemberCoinWithdrawEntity> memberCoinWithdrawEntities = memberCoinWithdrawDao.selectListByDate(member.getId(),new Date());
//        if(CollUtil.isNotEmpty(memberCoinWithdrawEntities)){
//            throw new FebsException("今日已提现");
//        }
        DappWalletCoinEntity walletCoin = dappWalletCoinDao.selectByMemberId(member.getId());
        if (walletCoin.getAvailableAmount().compareTo(withdrawDto.getAmount()) < 0) {
@@ -410,6 +415,19 @@
            throw new FebsException("功能升级中");
        }
        DataDictionaryCustom startSymbolDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                DataDictionaryEnum.START_SYMBOL.getType(),
                DataDictionaryEnum.START_SYMBOL.getCode()
        );
        if("STOP".equals(startSymbolDic.getValue())){
            throw new FebsException("贡献暂未开启");
        }
        DateTime startTime = DateUtil.parseDateTime("2024-07-09 17:00:00");
        if(DateUtil.compare(DateUtil.date(), startTime) < 0){
            throw new FebsException("贡献暂未开启");
        }
        BigDecimal amount = transferDto.getAmount();
        if(BigDecimal.ZERO.compareTo(amount) >= 0){
            throw new FebsException("请输入正确的存储数量");