| | |
| | | package cc.mrbird.febs.job; |
| | | |
| | | import cc.mrbird.febs.dapp.entity.DappFundFlowEntity; |
| | | import cc.mrbird.febs.dapp.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.dapp.enumerate.FundFlowEnum; |
| | | import cc.mrbird.febs.dapp.enumerate.MemberLevelEnum; |
| | | import cc.mrbird.febs.dapp.enumerate.NodeCodeEnum; |
| | | import cc.mrbird.febs.dapp.enumerate.PoolEnum; |
| | | import cc.mrbird.febs.dapp.mapper.DappFundFlowDao; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | @ConditionalOnProperty(prefix = "system", name = "online-transfer", havingValue = "true") |
| | | @ConditionalOnProperty(prefix = "system", name = "quartz-job", havingValue = "true") |
| | | public class BnbTransferJob{ |
| | | /** |
| | | * 搜索还未发生转账操作,但是记录已经更新没有产生HASH值的流水记录,并发起转账操作 |
| | | */ |
| | | @Autowired |
| | | private DappFundFlowDao dappFundFlowDao; |
| | | @Autowired |
| | | private ChainProducer chainProducer; |
| | | |
| | | // @Scheduled(cron = "0/10 * * * * ? ") |
| | | // public void BnbTransferAgain() { |
| | | // DappFundFlowEntity dappFundFlowEntity = dappFundFlowDao.selectByStateAndVersionAndFromHashLimitOne(2,2); |
| | | // if(ObjectUtil.isNotEmpty(dappFundFlowEntity)){ |
| | | // Integer isReturn = dappFundFlowEntity.getIsReturn(); |
| | | // if(DappFundFlowEntity.WITHDRAW_STATUS_AGREE == isReturn){ |
| | | // dappFundFlowEntity.setIsReturn(1); |
| | | // dappFundFlowDao.updateById(dappFundFlowEntity); |
| | | // chainProducer.sendBnbTransferTestMsg(dappFundFlowEntity.getId()); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | @Autowired |
| | | private DappSystemService dappSystemService; |
| | | |
| | | /** |
| | | * 每天按照消费金额的5‰静释放(千分之五的静态释放比例) |
| | | * (按购买顺序结算,同时有5个订单就有结算记录) |
| | | * (设置多少,全部按照最新的来释放) |
| | | */ |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void aKlineJobDay() { |
| | | dappSystemService.memberPerk(); |
| | | } |
| | | |
| | | |
| | | } |