| | |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.contants.SystemConstants; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.chain.ChainEnum; |
| | | import cc.mrbird.febs.dapp.chain.ChainService; |
| | | import cc.mrbird.febs.dapp.contract.ContractMain; |
| | |
| | | import cc.mrbird.febs.dapp.mapper.DappMemberDao; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import cc.mrbird.febs.dapp.vo.AKLineLimitVo; |
| | | import cc.mrbird.febs.dapp.vo.AKLineVo; |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.BigInteger; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ChainProducer chainProducer; |
| | | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | // String address = dappMemberEntity.getAddress(); |
| | | // String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount); |
| | | // if(StrUtil.isEmpty(hash)){ |
| | | // return; |
| | | // } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | List<JSONObject> objects = new ArrayList<>(); |
| | | AKLineVo akLineVo = new AKLineVo(); |
| | | akLineVo.setCreateTime(DateUtil.date()); |
| | | akLineVo.setClosePrice(BigDecimal.ZERO); |
| | | akLineVo.setOpenPrice(BigDecimal.ZERO); |
| | | akLineVo.setLowestPrice(BigDecimal.ZERO); |
| | | akLineVo.setHighestPrice(BigDecimal.ZERO); |
| | | JSONObject parseObj = JSONUtil.parseObj(akLineVo); |
| | | objects.add(parseObj); |
| | | objects.add(parseObj); |
| | | objects.add(parseObj); |
| | | objects.add(parseObj); |
| | | System.out.println(objects); |
| | | } |
| | | @Test |
| | | public void tranfer(){ |
| | | // dappSystemService.antKLineMsg(1); |
| | | dappSystemService.aKlineJobHour(); |
| | | // dappSystemService.aKlineJobDay(); |
| | | // dappSystemService.AntACoinInMsg(164L); |
| | | |
| | | // List<JSONObject> objects = new ArrayList<>(); |
| | | // AKLineVo akLineVo = new AKLineVo(); |
| | | // akLineVo.setCreateTime(DateUtil.date()); |
| | | // akLineVo.setClosePrice(BigDecimal.ZERO); |
| | | // akLineVo.setOpenPrice(BigDecimal.ZERO); |
| | | // akLineVo.setLowestPrice(BigDecimal.ZERO); |
| | | // akLineVo.setHighestPrice(BigDecimal.ZERO); |
| | | // JSONObject parseObj = JSONUtil.parseObj(akLineVo); |
| | | // objects.add(parseObj); |
| | | // objects.add(parseObj); |
| | | // objects.add(parseObj); |
| | | // objects.add(parseObj); |
| | | // System.out.println(objects); |
| | | // System.out.println(objects.toString()); |
| | | // redisUtils.set("test",objects.toString()); |
| | | // Object test = redisUtils.get("test"); |
| | | // System.out.println(test.toString()); |
| | | // JSONArray jsonArray = JSONUtil.parseArray(test); |
| | | // System.out.println(jsonArray); |
| | | |
| | | // String hash = ChainService.getInstance(ChainEnum.BNB.name()).transferBaseToken(address, amount); |
| | | //// if(StrUtil.isEmpty(hash)){ |
| | | //// return; |
| | |
| | | // System.out.println(balance); |
| | | |
| | | |
| | | dappSystemService.bnbTransferTest(44L); |
| | | // dappSystemService.bnbTransferTest(44L); |
| | | |
| | | |
| | | //发送转币消息 |
| | |
| | | private DappSystemService dappSystemService; |
| | | @Test |
| | | public void balance() { |
| | | |
| | | dappSystemService.selectAndInsertDics(); |
| | | /** |
| | | * 从contractAddress合约地址中转移对应发行的代币到address中 |
| | | */ |