| | |
| | | return; |
| | | } |
| | | //金额 |
| | | BigDecimal amount = dappFundFlowEntity.getAmount(); |
| | | BigDecimal amount = dappFundFlowEntity.getAmount().setScale(4,BigDecimal.ROUND_DOWN); |
| | | |
| | | Long memberId = dappFundFlowEntity.getMemberId(); |
| | | DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId); |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void antKLineABMsg(Long id) { |
| | | log.info("{}",id); |
| | | //获取对应的流水记录 |
| | | DappFundFlowEntity dappFundFlowEntity = dappFundFlowDao.selectInfoById(id); |
| | | if(ObjectUtil.isEmpty(dappFundFlowEntity)){ |
| | | return; |
| | | } |
| | | Long memberId = dappFundFlowEntity.getMemberId(); |
| | | DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId); |
| | | if(ObjectUtil.isEmpty(dappMemberEntity)){ |
| | | return; |
| | | } |
| | | DappFundFlowEntity dappFundFlow = dappFundFlowDao.selectById(id); |
| | | //金额 |
| | | BigDecimal amount = dappFundFlow.getAmount(); |
| | | //目标地址 |
| | | String address = null; |
| | | if(5 == dappFundFlowEntity.getType()){ |
| | | address = AppContants.ADDRESS_A_POOL_PEOJECT; |
| | | }else if(6 == dappFundFlowEntity.getType()){ |
| | | address = AppContants.ADDRESS_B_POOL_PEOJECT; |
| | | }else{ |
| | | return; |
| | | } |
| | | /** |
| | | * 发起USDT转账 |
| | | */ |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT_A_POOL.name()).transfer(address, amount); |
| | | if(StrUtil.isEmpty(hash)){ |
| | | return; |
| | | } |
| | | log.info("{},{}",id,hash); |
| | | dappFundFlow.setFromHash(hash); |
| | | dappFundFlow.setStatus(2); |
| | | dappFundFlowDao.updateById(dappFundFlow); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 生成当前分钟的k线数据,type为0 |
| | | */ |