package com.jeequan;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.jeequan.jeepay.mgr.bootstrap.JeepayMgrApplication;
import com.jeequan.jeepay.service.impl.StatsTransferService;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;

/**
 * TODO
 *
 * @author deng
 * @since 2024/5/22
 */
@Slf4j
@ExtendWith(SpringExtension.class)
@SpringBootTest(classes = JeepayMgrApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class TransferOrderTest {

    @Autowired
    private StatsTransferService statsTransferService;

    /**
     * 代付订单统计测试
     */
    @Test
    public void testStats() {
        DateTime yesterday = DateUtil.yesterday();
        DateTime dateTime = DateUtil.endOfDay(yesterday);
        statsTransferService.handleStats(null, dateTime);
    }
}
