Helius
2021-05-13 77a79a8a245a8d835881cc69eb5b4c1f45f6093a
src/test/java/com/xcong/excoin/XchTest.java
@@ -1,6 +1,8 @@
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 org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -14,6 +16,23 @@
    @Test
    public void usdtReturnTest() {
        xchProfitService.agentProfitDistributor();
        xchProfitService.agentUsdtProfitDistributor();
    }
    @Test
    public void dateUtilTest() {
        String day1 = "2021-05-11 23:00:00";
        String day2 = "2021-05-12 23:01:00";
        System.out.println(DateUtil.between(DateUtil.parse(day1), DateUtil.parse(day2), DateUnit.DAY));
    }
    @Test
    public void becomeAgentTest() {
        xchProfitService.autoBeAgent(40L);
    }
    @Test
    public void orderUsdtProfitTest() {
        xchProfitService.usdtProfitDistributorByOrderId(7L);
    }
}