package cn.com.poc.data_analyze;

import cn.com.poc.common.constant.FormReportingConstant;
import cn.com.poc.data_analyze.constants.DataAnalyzeTimeRangeEnum;
import cn.com.poc.data_analyze.domain.DataAnalyzeTimeRange;
import cn.com.poc.formreport.FormReportRequest;
import cn.com.poc.formreport.aggregate.FormReportingService;
import cn.com.yict.framemax.core.spring.SingleContextInitializer;
import org.junit.runner.RunWith;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

import javax.annotation.Resource;

/**
 * @author alex.yao
 * @date 2024/12/20
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(initializers = SingleContextInitializer.class)
@WebAppConfiguration
public class FromReportTest {

    @Resource
    private FormReportingService formReportingService;

    @Test
    public void test_apiChannelPointUsage() throws Exception {
//        DataAnalyzeTimeRange dataAnalyzeTimeRange = new DataAnalyzeTimeRange();
//        dataAnalyzeTimeRange.setRangType(DataAnalyzeTimeRangeEnum.month.getType());
//
//        FormReportRequest formReportRequest = new FormReportRequest();
//        formReportRequest.setAgentId("0376313e2eca4dbba8340a5de5585051");
//        formReportRequest.setTimeRange(dataAnalyzeTimeRange);
//        formReportRequest.setReportRequestType(FormReportingConstant.REPORT_TYPE.API_CHANNEL_POINT_USAGE);
//
//        String url = formReportingService.report(formReportRequest, null, null);
//        System.out.println(url);
    }

}
