From 3c061a93eb266b05666c9a557b91943fcfba2669 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 14 May 2021 16:01:02 +0800
Subject: [PATCH] modify
---
src/test/java/com/xcong/excoin/XchTest.java | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 1 deletions(-)
diff --git a/src/test/java/com/xcong/excoin/XchTest.java b/src/test/java/com/xcong/excoin/XchTest.java
index bdde057..611af9d 100644
--- a/src/test/java/com/xcong/excoin/XchTest.java
+++ b/src/test/java/com/xcong/excoin/XchTest.java
@@ -1,10 +1,17 @@
package com.xcong.excoin;
+import cn.hutool.core.date.DateUnit;
+import cn.hutool.core.date.DateUtil;
+import com.xcong.excoin.modules.yunding.dao.YdOrderDao;
+import com.xcong.excoin.modules.yunding.entity.YdOrderEntity;
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;
+
+import java.math.BigDecimal;
@SpringBootTest
public class XchTest {
@@ -14,6 +21,48 @@
@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();
+// }
+
+ @Autowired
+ private YdOrderDao ydOrderDao;
+
+ @Test
+ public void orderTest() {
+ YdOrderEntity orderEntity = new YdOrderEntity();
+ orderEntity.setType(YdOrderEntity.AGENT_ORDER);
+ orderEntity.setMemberId(40L);
+ orderEntity.setAmount(BigDecimal.TEN);
+ ydOrderDao.insert(orderEntity);
+ }
+
+ @Test
+ public void xchProfitTest() {
+ xchProfitService.xchProfitDistributor(BigDecimal.valueOf(1));
}
}
--
Gitblit v1.9.1