package com.xcong.excoin; import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; import com.xcong.excoin.modules.yunding.service.XchProfitService; import com.xcong.excoin.quartz.job.YdPowerJob; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest public class XchTest { @Autowired private XchProfitService xchProfitService; @Test public void usdtReturnTest() { xchProfitService.agentUsdtProfitDistributor(); } @Test public void dateUtilTest() { String day1 = "2021-05-12 22:00:00"; String day2 = "2021-05-12 23:00:00"; System.out.println(DateUtil.compare(DateUtil.parse(day1, "yyyy-MM-dd HH:mm:ss"), DateUtil.parse(day2, "yyyy-MM-dd HH:mm:ss"))); } @Test public void becomeAgentTest() { xchProfitService.autoBeAgent(40L); } @Test public void orderUsdtProfitTest() { xchProfitService.usdtProfitDistributorByOrderId(7L); } @Autowired private YdPowerJob ydPowerJob; @Test public void ydPowerTest() { ydPowerJob.orderWork(); } }