| | |
| | | dappFundFlowDao.updateById(dappFundFlowEntity); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String address = AppContants.ADDRESS_A_POOL_PEOJECT; |
| | | /** |
| | | * 发起USDT转账 |
| | | */ |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT_A_POOL.name()).transfer(address, new BigDecimal("0.01")); |
| | | } |
| | | |
| | | @Override |
| | | public void AntACoinBPollInMsg(Long id) { |
| | | log.info("{}",id); |
| | |
| | | return; |
| | | } |
| | | //金额 |
| | | BigDecimal amount = dappFundFlowEntity.getAmount(); |
| | | BigDecimal amount = dappFundFlowEntity.getAmount().setScale(4,BigDecimal.ROUND_DOWN); |
| | | log.info("amount:{}",amount); |
| | | if(BigDecimal.ZERO.compareTo(amount) >= 0){ |
| | | return; |
| | | } |
| | | |
| | | Long memberId = dappFundFlowEntity.getMemberId(); |
| | | DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId); |
| | |
| | | * 发起USDT转账 |
| | | */ |
| | | log.info("amount:{},address:{}",amount,address); |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL.name()).transfer(address, amount); |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL.name()).transfer(address, amount.negate()); |
| | | if(StrUtil.isEmpty(hash)){ |
| | | return; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | @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 |
| | | */ |
| | |
| | | DappAKlineEntity oldOne = dappAKlineMapper.selectOneByType(); |
| | | if(ObjectUtil.isNotEmpty(oldOne)){ |
| | | dappAKlineEntity.setOpenPrice(oldOne.getClosePrice()); |
| | | }else{ |
| | | dappAKlineEntity.setOpenPrice(coinAPrice); |
| | | } |
| | | dappAKlineEntity.setOpenPrice(coinAPrice); |
| | | dappAKlineEntity.setLowestPrice(coinAPrice); |
| | | dappAKlineEntity.setHighestPrice(coinAPrice); |
| | | dappAKlineEntity.setClosePrice(coinAPrice); |
| | |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | int month = DateUtil.dayOfMonth(DateUtil.date()); |
| | | String s = DateUtil.dayOfWeekEnum(DateUtil.date()).toChinese(); |
| | | System.out.println(s); |
| | | System.out.println(month); |
| | | } |
| | | // public static void main(String[] args) { |
| | | // |
| | | // int month = DateUtil.dayOfMonth(DateUtil.date()); |
| | | // String s = DateUtil.dayOfWeekEnum(DateUtil.date()).toChinese(); |
| | | // System.out.println(s); |
| | | // System.out.println(month); |
| | | // } |
| | | |
| | | /** |
| | | * 判断直推人数是否达标 |