From 357c5a3c4659f1fe9e46e8c20827ab757c5d3929 Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 14 十二月 2023 15:27:34 +0800 Subject: [PATCH] 增加数据请求配置表和异常分析配置表的接口 --- src/test/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisControllerTest.kt | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/test/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisControllerTest.kt b/src/test/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisControllerTest.kt index 7ac1b93..96e1c03 100644 --- a/src/test/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisControllerTest.kt +++ b/src/test/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisControllerTest.kt @@ -1,5 +1,6 @@ package com.flightfeather.monitor.analysis.dust +import com.flightfeather.monitor.utils.DateUtil import org.junit.Test import org.junit.jupiter.api.extension.ExtendWith import org.junit.runner.RunWith @@ -7,6 +8,7 @@ import org.springframework.boot.test.context.SpringBootTest import org.springframework.test.context.junit.jupiter.SpringExtension import org.springframework.test.context.junit4.SpringRunner +import java.time.LocalDate @RunWith(SpringRunner::class) @ExtendWith(SpringExtension::class) @@ -19,18 +21,20 @@ @Test fun autoRunDaily() { riskAnalysisController.init() -// val s = LocalDate.of(2023, 10, 1) -// val e = LocalDate.of(2023, 10, 31) -// val du = DateUtil.findDurationDate(s, e) -// du.forEach { -// riskAnalysisController.runDaily(it) -// } - riskAnalysisController.autoRunDaily() + val s = LocalDate.of(2023, 10, 1) + val e = LocalDate.of(2023, 10, 31) + val du = DateUtil.findDurationDate(s, e) + du.forEach { + riskAnalysisController.runDaily(it) + } +// riskAnalysisController.autoRunDaily() } @Test fun autoRunMonthly() { riskAnalysisController.init() - riskAnalysisController.autoRunMonthly() + val s = LocalDate.of(2023, 10, 1) + riskAnalysisController.runMonthly(s) +// riskAnalysisController.autoRunMonthly() } } \ No newline at end of file -- Gitblit v1.9.3