| | |
| | | if (e.from.equals("0xaa25aa7a19f9c426e07dee59b12f944f4d9f1dd3")) { |
| | | return; |
| | | } |
| | | String toAddress = e.to; |
| | | DappMemberEntity fromMember = dappMemberDao.selectByAddress(toAddress, null); |
| | | if(ObjectUtil.isEmpty(fromMember)){ |
| | | return; |
| | | } |
| | | |
| | | BigInteger tokens = e.tokens; |
| | | BigDecimal amount = new BigDecimal(tokens.toString()).divide(BigDecimal.TEN.pow(decimals), decimals, RoundingMode.HALF_DOWN); |
| | | |
| | | DappFundFlowEntity fundFlow = dappFundFlowDao.selectByFromHash(e.log.getTransactionHash(), null); |
| | | DappFundFlowEntity fundFlow = dappFundFlowDao.selectByFromHashAndAndMemberId(e.log.getTransactionHash(), null,fromMember.getId()); |
| | | if(ObjectUtil.isNotEmpty(fundFlow) && 1 == fundFlow.getStatus()){ |
| | | log.info("触发USDT合约监听事件-买入贡献值,金额:{}",amount); |
| | | if(1 == fundFlow.getType()){//认购贡献值 1 |
| | |
| | | return; |
| | | } |
| | | |
| | | fundFlow.setAmount(fundFlow.getAmount().negate()); |
| | | // fundFlow.setAmount(fundFlow.getAmount().negate()); |
| | | // 更改状态为已同步 |
| | | fundFlow.setStatus(2); |
| | | dappFundFlowDao.updateById(fundFlow); |