1、AlertMessage实体类增加content字段,并同步mapper中新增、查询方法增加content字段

2、DynamicRuleObject实体类新增log_rule_id属性,并同步mapper中新增、查询方法增加log_rule_id字段
3、StaticRule新建增加ip、maskip是否匹配的判断,批量新建和更新还没增加。
This commit is contained in:
Hao Miao
2024-01-29 23:41:13 +08:00
parent e48f837b64
commit 1be5269d1d
11 changed files with 129 additions and 61 deletions

View File

@@ -70,8 +70,8 @@ public class AlertMessageService {
// 1查询生成指令所需信息和alertMessage中的fiveTuple信息 合并成 TaskCommandInfo;
// 2额外信息并额外查询templateId、protectLevel和taskStatus
TaskCommandInfo dynamicCommandInfo = alertMessageMapper.getDynamicTaskInfos(taskId, DynamicRuleId);
if (dynamicCommandInfo.getTemplateId() == null){
throw new IllegalArgumentException("taskId: " + taskId + " DynamicRuleId: " + DynamicRuleId + "匹配");
if (dynamicCommandInfo == null || dynamicCommandInfo.getTemplateId() == null){
throw new IllegalArgumentException("taskId: " + taskId + " DynamicRuleId: " + DynamicRuleId + "正确");
}
// 根据templateId、protectLevel获取策略模板
ProtectLevel templateProtectLevel = alertMessageMapper.queryTemplateProtectLevel(