1、静态、动态规则删去局点,任务添加局点
2、修改fakec3的测试ip地址
(cherry picked from commit 540795b5f6)
This commit is contained in:
@@ -86,9 +86,9 @@ public class DynamicRuleObject {
|
||||
@Schema(description = "优先级", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer dynamicRulePriority;
|
||||
@NotNull
|
||||
@JsonProperty("dynamic_rule_range")
|
||||
@Schema(description = "范围", example = "北京", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String dynamicRuleRange;
|
||||
// @JsonProperty("dynamic_rule_range")
|
||||
// @Schema(description = "范围", example = "北京", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
// private String dynamicRuleRange;
|
||||
@NotNull
|
||||
@JsonProperty("dynamic_rule_frequency")
|
||||
@Schema(description = "频率", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -135,10 +135,10 @@ public class StaticRuleObject {
|
||||
@Min(value = 1)
|
||||
@Schema(description = "优先级,1代表高2代表中3代表低", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer staticRulePriority;
|
||||
@JsonProperty("static_rule_range")
|
||||
@ExcelProperty("范围")
|
||||
@Schema(description = "范围", example = "北京", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String staticRuleRange;
|
||||
// @JsonProperty("static_rule_range")
|
||||
// @ExcelProperty("范围")
|
||||
// @Schema(description = "范围", example = "北京", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
// private String staticRuleRange;
|
||||
@JsonProperty("static_rule_frequency")
|
||||
@ExcelProperty("频率")
|
||||
@Min(value = 1)
|
||||
|
||||
@@ -78,4 +78,9 @@ public class Task {
|
||||
@JsonProperty("task_audit_status")
|
||||
@Schema(description = "任务审核状态(0为未审核,1为已退回,2为已通过)", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
private Integer taskAuditStatus;
|
||||
|
||||
@JsonProperty("task_range")
|
||||
@NotNull(message = "task_range字段不能为空。")
|
||||
@Schema(description = "局点范围,由规则移动到任务", example = "1009")
|
||||
private String taskRange;
|
||||
}
|
||||
|
||||
@@ -109,8 +109,8 @@ public class DynamicRuleService {
|
||||
Template template = dynamicRuleMapper.queryTemplateByRuleId(dynamicRuleId);
|
||||
if (template == null){
|
||||
//template在表中删除了,需要重新设置template(感觉这种情况不多见)
|
||||
dynamicRuleObject.setDynamicRuleSourceSystem("need reset");
|
||||
dynamicRuleObject.setDynamicRuleEventType("need reset");
|
||||
dynamicRuleObject.setDynamicRuleSourceSystem(null);
|
||||
dynamicRuleObject.setDynamicRuleEventType(null);
|
||||
}else{
|
||||
dynamicRuleObject.setDynamicRuleSourceSystem(template.getSourceSystem());
|
||||
dynamicRuleObject.setDynamicRuleEventType(template.getTemplateName());
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.realtime.protection.server.rule.staticrule;
|
||||
|
||||
import com.alibaba.excel.util.ListUtils;
|
||||
import com.realtime.protection.configuration.entity.rule.staticrule.StaticRuleObject;
|
||||
import com.realtime.protection.configuration.utils.Counter;
|
||||
import com.realtime.protection.configuration.entity.whitelist.WhiteListObject;
|
||||
import com.realtime.protection.configuration.utils.SqlSessionWrapper;
|
||||
import com.realtime.protection.configuration.utils.enums.RuleEnum;
|
||||
@@ -16,6 +17,11 @@ import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -70,6 +76,9 @@ public class StaticRuleService {
|
||||
if (!RuleEnum.checkValidate(object)) {
|
||||
throw new IllegalArgumentException("静态规则不符合指定的配置方法,请参考规则模板以配置静态规则");
|
||||
}
|
||||
/*
|
||||
新建静态规则,过一下白名单审核
|
||||
*/
|
||||
List<StaticRuleObject> staticRuleObjects = new ArrayList<>();
|
||||
staticRuleObjects.add(object);
|
||||
List<WhiteListObject> whiteListsHit = whiteListService.whiteListStaticRulesObjectCheck(staticRuleObjects);
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
public class StateHandler {
|
||||
|
||||
private final WebClient client = WebClient.builder()
|
||||
.baseUrl("http://192.168.107.89:9081")
|
||||
.baseUrl("http://192.168.107.49:8088")
|
||||
.build();
|
||||
|
||||
protected Boolean handleStart(TaskService taskService, CommandService commandService, Long taskId) {
|
||||
|
||||
Reference in New Issue
Block a user