From b1a211630ad56ad39ff0810ab8f480d7e831962f Mon Sep 17 00:00:00 2001 From: PushM <584406942@qq.com> Date: Tue, 11 Jun 2024 00:39:28 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E9=98=B2=E6=8A=A4?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E6=8C=89id=E3=80=81ids=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=BF=94=E5=9B=9Eip=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82=202=E3=80=81=E6=8C=87=E4=BB=A4=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=A2=9E=E5=8A=A0=E5=86=99=E5=85=A5RULE=5FNAME?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/entity/task/TaskCommandInfo.java | 4 ++++ .../protection/configuration/response/AuditAdvice.java | 1 + src/main/resources/mappers/AlertMessageMapper.xml | 5 ++++- src/main/resources/mappers/CommandMapper.xml | 10 ++++++---- src/main/resources/mappers/ProtectObjectMapper.xml | 8 +++++--- src/main/resources/mappers/TaskMapper.xml | 4 +++- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/realtime/protection/configuration/entity/task/TaskCommandInfo.java b/src/main/java/com/realtime/protection/configuration/entity/task/TaskCommandInfo.java index b20f879..d7240ae 100644 --- a/src/main/java/com/realtime/protection/configuration/entity/task/TaskCommandInfo.java +++ b/src/main/java/com/realtime/protection/configuration/entity/task/TaskCommandInfo.java @@ -118,6 +118,9 @@ public class TaskCommandInfo { @Schema(description = "指令展示id", accessMode = Schema.AccessMode.READ_ONLY) private String displayId; + @Schema(description = "规则名称", accessMode = Schema.AccessMode.READ_ONLY) + private String ruleName; + // 复制构造函数 public void copyTaskCommandInfo(TaskCommandInfo original) { this.UUID = original.UUID; @@ -144,6 +147,7 @@ public class TaskCommandInfo { this.templateId = original.templateId; this.protectLevel = original.protectLevel; this.taskStatus = original.taskStatus; + this.ruleName = original.ruleName; } public void setProtocolNum() { diff --git a/src/main/java/com/realtime/protection/configuration/response/AuditAdvice.java b/src/main/java/com/realtime/protection/configuration/response/AuditAdvice.java index 570bede..19ab1c9 100644 --- a/src/main/java/com/realtime/protection/configuration/response/AuditAdvice.java +++ b/src/main/java/com/realtime/protection/configuration/response/AuditAdvice.java @@ -34,6 +34,7 @@ public class AuditAdvice implements ResponseBodyAdvice { private final WebClient webClient = WebClient .builder() .baseUrl("http://39.105.210.156:8090/chanct-log/audit-xgs") +// .baseUrl("http://10.58.44.241:1888/api/chanct-log/audit-xgs") .build(); @Data diff --git a/src/main/resources/mappers/AlertMessageMapper.xml b/src/main/resources/mappers/AlertMessageMapper.xml index e570304..eb1d5ac 100644 --- a/src/main/resources/mappers/AlertMessageMapper.xml +++ b/src/main/resources/mappers/AlertMessageMapper.xml @@ -26,6 +26,8 @@ + + @@ -238,8 +240,9 @@ t_task.task_range, t_task.protect_level, t_task.task_status, - t_task.event_type + t_task.event_type, -- t_tmplate.strategy_template_name + t_dr.dynamic_rule_name from t_task left join realtime_protection.t_dynamic_rule t_dr on diff --git a/src/main/resources/mappers/CommandMapper.xml b/src/main/resources/mappers/CommandMapper.xml index 613a123..eb06ee7 100644 --- a/src/main/resources/mappers/CommandMapper.xml +++ b/src/main/resources/mappers/CommandMapper.xml @@ -9,7 +9,7 @@ MASK_SRC_IP, MASK_SRC_PORT, MASK_DST_IP, MASK_DST_PORT, MASK_PROTOCOL, VALID_TIME, INVALID_TIME, IS_VALID, IS_JUDGED, SEND_TIMES, SUCCESS_TIMES, CREATE_TIME, LAST_UPDATE, IS_DELETED, - TASKTYPE, RULE_ID, display_id) + TASKTYPE, RULE_ID, display_id,RULE_NAME) values (#{info.UUID}, #{info.taskId}, #{info.taskAct}, #{info.taskName}, #{info.eventType}, #{info.taskCreateDepart}, #{info.distributePoint}, #{info.frequency}, DEFAULT, @@ -22,7 +22,8 @@ #{info.startTime}, #{info.endTime}, #{info.isValid}, #{info.isJudged}, 0, 0, - NOW(), NOW(), FALSE, #{info.taskType}, #{info.ruleId}, #{info.displayId} + NOW(), NOW(), FALSE, #{info.taskType}, #{info.ruleId}, #{info.displayId}, + #{info.ruleName} ) @@ -33,7 +34,7 @@ MASK_SRC_IP, MASK_SRC_PORT, MASK_DST_IP, MASK_DST_PORT, MASK_PROTOCOL, VALID_TIME, INVALID_TIME, IS_VALID, IS_JUDGED, SEND_TIMES, SUCCESS_TIMES, CREATE_TIME, LAST_UPDATE, IS_DELETED, - TASKTYPE, RULE_ID, display_id) + TASKTYPE, RULE_ID, display_id,RULE_NAME) values (#{info.UUID}, #{info.taskId}, #{info.taskAct}, #{info.taskName}, #{info.eventType}, #{info.taskCreateDepart}, #{info.distributePoint}, @@ -48,7 +49,8 @@ #{info.startTime}, #{info.endTime}, #{info.isValid}, #{info.isJudged}, 0, 0, - NOW(), NOW(), FALSE, #{info.taskType}, #{info.ruleId}, #{info.displayId} + NOW(), NOW(), FALSE, #{info.taskType}, #{info.ruleId}, #{info.displayId}, + #{info.ruleName} ) diff --git a/src/main/resources/mappers/ProtectObjectMapper.xml b/src/main/resources/mappers/ProtectObjectMapper.xml index 64a3e00..a9f4e32 100644 --- a/src/main/resources/mappers/ProtectObjectMapper.xml +++ b/src/main/resources/mappers/ProtectObjectMapper.xml @@ -203,7 +203,7 @@ SELECT protect_object_id, protect_object_name, protect_object_system_name, - INET_NTOA(protect_object_ip) as protect_object_ip, + INET_NTOA(protect_object_ip) as protect_object_ip_d, protect_object_port, protect_object_url, protect_object_protocol, @@ -278,7 +278,8 @@ WHERE protect_object_id = #{proobj_id}