From 7f580342dce92cb321e2566ef9a02827435a2de2 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 07 十一月 2023 17:30:27 +0800 Subject: [PATCH] 1. 新增风险值数据库表; 2. 修改异常分析模块的代码位置; --- src/main/java/com/flightfeather/monitor/domain/ds1/mapper/RiskValueMapper.kt | 8 + src/main/java/com/flightfeather/monitor/scheduledtasks/DustAnalysisTask.kt | 23 ++- src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataMissing.kt | 2 src/test/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisControllerTest.kt | 11 + src/main/java/com/flightfeather/monitor/domain/ds1/entity/RiskValue.java | 214 +++++++++++++++++++++++++++++++++++ src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseExceptionContinuous.kt | 2 src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionValueMutation.kt | 2 src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisController.kt | 1 src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt | 2 src/main/resources/mapper/ds1/RiskValueMapper.xml | 25 ++++ src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataExceed.kt | 2 src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseDustExceptionAnalysis.kt | 2 src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionExceedingTimes.kt | 2 src/main/resources/generator/generatorConfig4ds1.xml | 6 src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt | 2 src/main/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisController.java | 7 + src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionApproachExceeding.kt | 2 src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionSlideAverage.kt | 2 18 files changed, 291 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisController.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisController.kt index 36ba506..b941cda 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisController.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisController.kt @@ -1,5 +1,6 @@ package com.flightfeather.monitor.analysis.dust +import com.flightfeather.monitor.analysis.dust.exception.* import com.flightfeather.monitor.domain.ds1.entity.DustExceptionData import com.flightfeather.monitor.domain.ds1.repository.DustExceptionDataRep import com.flightfeather.monitor.domain.ds1.repository.DustExceptionSettingRep diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisController.java b/src/main/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisController.java new file mode 100644 index 0000000..9105baa --- /dev/null +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/RiskAnalysisController.java @@ -0,0 +1,7 @@ +package com.flightfeather.monitor.analysis.dust; + +/** + * 鏁版嵁椋庨櫓鍒嗘瀽鎺у埗鍣� + */ +public class RiskAnalysisController { +} diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/BaseDustExceptionAnalysis.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseDustExceptionAnalysis.kt similarity index 95% rename from src/main/java/com/flightfeather/monitor/analysis/dust/BaseDustExceptionAnalysis.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseDustExceptionAnalysis.kt index c96f0b0..ef11fbf 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/BaseDustExceptionAnalysis.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseDustExceptionAnalysis.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.analysis.BaseDataAnalysis import com.flightfeather.monitor.domain.ds1.entity.DustExceptionData diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/BaseExceptionContinuous.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseExceptionContinuous.kt similarity index 97% rename from src/main/java/com/flightfeather/monitor/analysis/dust/BaseExceptionContinuous.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseExceptionContinuous.kt index 5908e86..59964e3 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/BaseExceptionContinuous.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/BaseExceptionContinuous.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionApproachExceeding.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionApproachExceeding.kt similarity index 93% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionApproachExceeding.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionApproachExceeding.kt index 131e81c..c334f4f 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionApproachExceeding.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionApproachExceeding.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataExceed.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataExceed.kt similarity index 91% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataExceed.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataExceed.kt index 4de2461..3dd3c6b 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataExceed.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataExceed.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataLowValue.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt similarity index 94% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataLowValue.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt index 3ab3121..353b7fe 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataLowValue.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataLowValue.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionData import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataMissing.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataMissing.kt similarity index 94% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataMissing.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataMissing.kt index 13762c5..e47ae04 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionDataMissing.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionDataMissing.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionExceedingTimes.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionExceedingTimes.kt similarity index 96% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionExceedingTimes.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionExceedingTimes.kt index 6d2729f..b67ecd9 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionExceedingTimes.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionExceedingTimes.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionData import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionNoFluctuation.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt similarity index 92% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionNoFluctuation.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt index f89fdef..c83b49e 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionNoFluctuation.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionNoFluctuation.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionSlideAverage.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionSlideAverage.kt similarity index 98% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionSlideAverage.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionSlideAverage.kt index 7a17ae0..fa5ff5a 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionSlideAverage.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionSlideAverage.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData diff --git a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionValueMutation.kt b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionValueMutation.kt similarity index 92% rename from src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionValueMutation.kt rename to src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionValueMutation.kt index 3b3747e..1695904 100644 --- a/src/main/java/com/flightfeather/monitor/analysis/dust/ExceptionValueMutation.kt +++ b/src/main/java/com/flightfeather/monitor/analysis/dust/exception/ExceptionValueMutation.kt @@ -1,4 +1,4 @@ -package com.flightfeather.monitor.analysis.dust +package com.flightfeather.monitor.analysis.dust.exception import com.flightfeather.monitor.domain.ds1.entity.DustExceptionSetting import com.flightfeather.monitor.domain.ds1.entity.DustSiteData diff --git a/src/main/java/com/flightfeather/monitor/domain/ds1/entity/RiskValue.java b/src/main/java/com/flightfeather/monitor/domain/ds1/entity/RiskValue.java new file mode 100644 index 0000000..4dc559a --- /dev/null +++ b/src/main/java/com/flightfeather/monitor/domain/ds1/entity/RiskValue.java @@ -0,0 +1,214 @@ +package com.flightfeather.monitor.domain.ds1.entity; + +import java.util.Date; +import javax.persistence.*; + +@Table(name = "du_js_t_risk_value") +public class RiskValue { + @Id + private Integer id; + + /** + * 鐩戞祴鐐圭紪鍙� + */ + @Column(name = "mn_code") + private String mnCode; + + /** + * 鏃堕棿 + */ + private Date lst; + + /** + * 鍦ㄧ嚎鐜囬闄╁�� + */ + @Column(name = "online_risk") + private Double onlineRisk; + + /** + * 鏈夋晥鐜囬闄╁�� + */ + @Column(name = "valid_risk") + private Double validRisk; + + /** + * 瓒呮爣椋庨櫓鍊� + */ + @Column(name = "exceed_risk") + private Double exceedRisk; + + /** + * 寮傚父绫诲瀷鑱氶泦搴� + */ + @Column(name = "exception_type_aggregation") + private Double exceptionTypeAggregation; + + /** + * 鍏稿瀷寮傚父澶嶇幇鐜� + */ + @Column(name = "typical_exception_repetition_rate") + private Double typicalExceptionRepetitionRate; + + /** + * 缁熻绫诲瀷锛堟棩缁熻鎴栨湀缁熻锛�,day month + */ + private String type; + + /** + * @return id + */ + public Integer getId() { + return id; + } + + /** + * @param id + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 鑾峰彇鐩戞祴鐐圭紪鍙� + * + * @return mn_code - 鐩戞祴鐐圭紪鍙� + */ + public String getMnCode() { + return mnCode; + } + + /** + * 璁剧疆鐩戞祴鐐圭紪鍙� + * + * @param mnCode 鐩戞祴鐐圭紪鍙� + */ + public void setMnCode(String mnCode) { + this.mnCode = mnCode == null ? null : mnCode.trim(); + } + + /** + * 鑾峰彇鏃堕棿 + * + * @return lst - 鏃堕棿 + */ + public Date getLst() { + return lst; + } + + /** + * 璁剧疆鏃堕棿 + * + * @param lst 鏃堕棿 + */ + public void setLst(Date lst) { + this.lst = lst; + } + + /** + * 鑾峰彇鍦ㄧ嚎鐜囬闄╁�� + * + * @return online_risk - 鍦ㄧ嚎鐜囬闄╁�� + */ + public Double getOnlineRisk() { + return onlineRisk; + } + + /** + * 璁剧疆鍦ㄧ嚎鐜囬闄╁�� + * + * @param onlineRisk 鍦ㄧ嚎鐜囬闄╁�� + */ + public void setOnlineRisk(Double onlineRisk) { + this.onlineRisk = onlineRisk; + } + + /** + * 鑾峰彇鏈夋晥鐜囬闄╁�� + * + * @return valid_risk - 鏈夋晥鐜囬闄╁�� + */ + public Double getValidRisk() { + return validRisk; + } + + /** + * 璁剧疆鏈夋晥鐜囬闄╁�� + * + * @param validRisk 鏈夋晥鐜囬闄╁�� + */ + public void setValidRisk(Double validRisk) { + this.validRisk = validRisk; + } + + /** + * 鑾峰彇瓒呮爣椋庨櫓鍊� + * + * @return exceed_risk - 瓒呮爣椋庨櫓鍊� + */ + public Double getExceedRisk() { + return exceedRisk; + } + + /** + * 璁剧疆瓒呮爣椋庨櫓鍊� + * + * @param exceedRisk 瓒呮爣椋庨櫓鍊� + */ + public void setExceedRisk(Double exceedRisk) { + this.exceedRisk = exceedRisk; + } + + /** + * 鑾峰彇寮傚父绫诲瀷鑱氶泦搴� + * + * @return exception_type_aggregation - 寮傚父绫诲瀷鑱氶泦搴� + */ + public Double getExceptionTypeAggregation() { + return exceptionTypeAggregation; + } + + /** + * 璁剧疆寮傚父绫诲瀷鑱氶泦搴� + * + * @param exceptionTypeAggregation 寮傚父绫诲瀷鑱氶泦搴� + */ + public void setExceptionTypeAggregation(Double exceptionTypeAggregation) { + this.exceptionTypeAggregation = exceptionTypeAggregation; + } + + /** + * 鑾峰彇鍏稿瀷寮傚父澶嶇幇鐜� + * + * @return typical_exception_repetition_rate - 鍏稿瀷寮傚父澶嶇幇鐜� + */ + public Double getTypicalExceptionRepetitionRate() { + return typicalExceptionRepetitionRate; + } + + /** + * 璁剧疆鍏稿瀷寮傚父澶嶇幇鐜� + * + * @param typicalExceptionRepetitionRate 鍏稿瀷寮傚父澶嶇幇鐜� + */ + public void setTypicalExceptionRepetitionRate(Double typicalExceptionRepetitionRate) { + this.typicalExceptionRepetitionRate = typicalExceptionRepetitionRate; + } + + /** + * 鑾峰彇缁熻绫诲瀷锛堟棩缁熻鎴栨湀缁熻锛�,day month + * + * @return type - 缁熻绫诲瀷锛堟棩缁熻鎴栨湀缁熻锛�,day month + */ + public String getType() { + return type; + } + + /** + * 璁剧疆缁熻绫诲瀷锛堟棩缁熻鎴栨湀缁熻锛�,day month + * + * @param type 缁熻绫诲瀷锛堟棩缁熻鎴栨湀缁熻锛�,day month + */ + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/flightfeather/monitor/domain/ds1/mapper/RiskValueMapper.kt b/src/main/java/com/flightfeather/monitor/domain/ds1/mapper/RiskValueMapper.kt new file mode 100644 index 0000000..0cd7327 --- /dev/null +++ b/src/main/java/com/flightfeather/monitor/domain/ds1/mapper/RiskValueMapper.kt @@ -0,0 +1,8 @@ +package com.flightfeather.monitor.domain.ds1.mapper + +import com.flightfeather.monitor.domain.ds1.entity.RiskValue +import com.flightfeather.monitor.domain.util.MyMapper +import org.apache.ibatis.annotations.Mapper + +@Mapper +interface RiskValueMapper : MyMapper<RiskValue?> \ No newline at end of file diff --git a/src/main/java/com/flightfeather/monitor/scheduledtasks/DustAnalysisTask.kt b/src/main/java/com/flightfeather/monitor/scheduledtasks/DustAnalysisTask.kt index a1fb853..6a2d142 100644 --- a/src/main/java/com/flightfeather/monitor/scheduledtasks/DustAnalysisTask.kt +++ b/src/main/java/com/flightfeather/monitor/scheduledtasks/DustAnalysisTask.kt @@ -33,26 +33,29 @@ // 鍒ゆ柇浠婃棩鐖彇浠诲姟鏄惁瀹屾垚 val task = requestTaskRep.findLatestTask(localtime) task1Delay = isTaskDelay(task) - if (task1Delay) return - log.info("寮傚父鍒嗘瀽鎵ц") - exceptionAnalysisController.init() - exceptionAnalysisController.autoRun() + if (!task1Delay) { + log.info("寮傚父鍒嗘瀽鎵ц") + exceptionAnalysisController.init() + exceptionAnalysisController.autoRun() + } } if (task2Delay || (localtime.hour == 9 && localtime.minute == 0)) { val task = requestTaskRep.findLatestTask(localtime) task2Delay = isTaskDelay(task) - if (task2Delay) return - log.info("鏃ュ垎鏋愭墽琛�") - statisticAnalysisController.autoRunDailyStatics() + if (!task2Delay) { + log.info("鏃ュ垎鏋愭墽琛�") + statisticAnalysisController.autoRunDailyStatics() + } } if (task3Delay || (localtime.dayOfMonth == 1 && localtime.hour == 9 && localtime.minute == 0)) { val task = requestTaskRep.findLatestTask(localtime) task3Delay = isTaskDelay(task) - if (task3Delay) return - log.info("鏈堝垎鏋愭墽琛�") - statisticAnalysisController.autoRunMonthlyStatics() + if (!task3Delay) { + log.info("鏈堝垎鏋愭墽琛�") + statisticAnalysisController.autoRunMonthlyStatics() + } } } diff --git a/src/main/resources/generator/generatorConfig4ds1.xml b/src/main/resources/generator/generatorConfig4ds1.xml index d7e6201..bd5dfdc 100644 --- a/src/main/resources/generator/generatorConfig4ds1.xml +++ b/src/main/resources/generator/generatorConfig4ds1.xml @@ -86,7 +86,11 @@ <!-- enableCountByExample="false"--> <!-- enableUpdateByExample="false" enableDeleteByExample="false"--> <!-- enableSelectByExample="false" selectByExampleQueryId="false"/>--> - <table tableName="du_js_t_request_task" domainObjectName="RequestTask" +<!-- <table tableName="du_js_t_request_task" domainObjectName="RequestTask"--> +<!-- enableCountByExample="false"--> +<!-- enableUpdateByExample="false" enableDeleteByExample="false"--> +<!-- enableSelectByExample="false" selectByExampleQueryId="false"/>--> + <table tableName="du_js_t_risk_value" domainObjectName="RiskValue" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/> diff --git a/src/main/resources/mapper/ds1/RiskValueMapper.xml b/src/main/resources/mapper/ds1/RiskValueMapper.xml new file mode 100644 index 0000000..9e8daa2 --- /dev/null +++ b/src/main/resources/mapper/ds1/RiskValueMapper.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.flightfeather.monitor.domain.ds1.mapper.RiskValueMapper"> + <resultMap id="BaseResultMap" type="com.flightfeather.monitor.domain.ds1.entity.RiskValue"> + <!-- + WARNING - @mbg.generated + --> + <id column="id" jdbcType="INTEGER" property="id" /> + <result column="mn_code" jdbcType="VARCHAR" property="mnCode" /> + <result column="lst" jdbcType="DATE" property="lst" /> + <result column="online_risk" jdbcType="DOUBLE" property="onlineRisk" /> + <result column="valid_risk" jdbcType="DOUBLE" property="validRisk" /> + <result column="exceed_risk" jdbcType="DOUBLE" property="exceedRisk" /> + <result column="exception_type_aggregation" jdbcType="DOUBLE" property="exceptionTypeAggregation" /> + <result column="typical_exception_repetition_rate" jdbcType="DOUBLE" property="typicalExceptionRepetitionRate" /> + <result column="type" jdbcType="VARCHAR" property="type" /> + </resultMap> + <sql id="Base_Column_List"> + <!-- + WARNING - @mbg.generated + --> + id, mn_code, lst, online_risk, valid_risk, exceed_risk, exception_type_aggregation, + typical_exception_repetition_rate, type + </sql> +</mapper> \ No newline at end of file diff --git a/src/test/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisControllerTest.kt b/src/test/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisControllerTest.kt index 176526f..6c31c13 100644 --- a/src/test/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisControllerTest.kt +++ b/src/test/java/com/flightfeather/monitor/analysis/dust/ExceptionAnalysisControllerTest.kt @@ -1,12 +1,13 @@ package com.flightfeather.monitor.analysis.dust -import org.junit.jupiter.api.Test +import org.junit.Test import org.junit.jupiter.api.extension.ExtendWith import org.junit.runner.RunWith import org.springframework.beans.factory.annotation.Autowired 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.Duration import java.time.LocalDate @RunWith(SpringRunner::class) @@ -26,8 +27,12 @@ @Test fun run() { exceptionAnalysisController.init() - val d = LocalDate.of(2023, 7, 2) - exceptionAnalysisController.run(d) + var d1 = LocalDate.of(2023, 10, 26) + val d2 = LocalDate.of(2023, 10, 26) + while (Duration.between(d1.atStartOfDay(), d2.atStartOfDay()).toDays() >= 0L) { + exceptionAnalysisController.run(d1) + d1 = d1.plusDays(1) + } // exceptionAnalysisController.debugRun() } } \ No newline at end of file -- Gitblit v1.9.3