|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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 { | 
|---|
|  |  |  | 
|---|
|  |  |  | public void orderUsdtProfitTest() { | 
|---|
|  |  |  | xchProfitService.usdtProfitDistributorByOrderId(7L); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // | 
|---|
|  |  |  | //    @Autowired | 
|---|
|  |  |  | //    private YdPowerJob ydPowerJob; | 
|---|
|  |  |  | // | 
|---|
|  |  |  | //    @Test | 
|---|
|  |  |  | //    public void ydPowerTest() { | 
|---|
|  |  |  | //        ydPowerJob.orderWork(); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private YdPowerJob ydPowerJob; | 
|---|
|  |  |  | private YdOrderDao ydOrderDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Test | 
|---|
|  |  |  | public void ydPowerTest() { | 
|---|
|  |  |  | ydPowerJob.orderWork(); | 
|---|
|  |  |  | public void orderTest() { | 
|---|
|  |  |  | YdOrderEntity orderEntity = new YdOrderEntity(); | 
|---|
|  |  |  | orderEntity.setType(YdOrderEntity.AGENT_ORDER); | 
|---|
|  |  |  | orderEntity.setMemberId(40L); | 
|---|
|  |  |  | orderEntity.setAmount(BigDecimal.TEN); | 
|---|
|  |  |  | ydOrderDao.insert(orderEntity); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|