Helius
2021-05-13 71a5b265af7b8046cbfd65986d4d0adf785d8cbc
src/test/java/com/xcong/excoin/XchTest.java
@@ -1,7 +1,10 @@
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;
@@ -14,6 +17,31 @@
    @Test
    public void usdtReturnTest() {
        xchProfitService.agentProfitDistributor();
        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();
    }
}