From e72fa0716169831068f8fe781640129e4ed49d6d Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 18 May 2021 18:43:21 +0800 Subject: [PATCH] modify --- src/test/java/com/xcong/excoin/XchTest.java | 43 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/xcong/excoin/XchTest.java b/src/test/java/com/xcong/excoin/XchTest.java index 1a70038..c87176f 100644 --- a/src/test/java/com/xcong/excoin/XchTest.java +++ b/src/test/java/com/xcong/excoin/XchTest.java @@ -3,11 +3,17 @@ import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; +import com.xcong.excoin.modules.coin.parameter.dto.CoinInListDto; +import com.xcong.excoin.modules.coin.service.CoinService; +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 { @@ -34,14 +40,43 @@ @Test public void orderUsdtProfitTest() { - xchProfitService.usdtProfitDistributorByOrderId(7L); + xchProfitService.usdtProfitDistributorByOrderId(1L); + } +// +// @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)); } @Autowired - private YdPowerJob ydPowerJob; + private CoinService coinService; @Test - public void ydPowerTest() { - ydPowerJob.orderWork(); + public void coinTest() { + CoinInListDto coin = new CoinInListDto(); + coin.setType(4); + coin.setPageNum(1); + coin.setPageSize(10); + coinService.coinInList(coin); } } -- Gitblit v1.9.1