1. 解除动态规则发送请求成功/失败返回状态
2. 在指令中添加局点/部门信息
This commit is contained in:
@@ -90,4 +90,26 @@ public class FiveTupleWithMask {
|
||||
assert protocol != null;
|
||||
this.protocolNum = protocol.getNumber();
|
||||
}
|
||||
|
||||
public void setMask() {
|
||||
if (this.sourceIP != null && this.maskSourceIP == null) {
|
||||
this.maskSourceIP = "255.255.255.255";
|
||||
}
|
||||
|
||||
if (this.sourcePort != null && this.maskSourcePort == null) {
|
||||
this.maskSourcePort = "65535";
|
||||
}
|
||||
|
||||
if (this.destinationIP != null && this.maskDestinationIP == null) {
|
||||
this.maskDestinationIP = "255.255.255.255";
|
||||
}
|
||||
|
||||
if (this.destinationPort != null && this.maskDestinationPort == null) {
|
||||
this.maskDestinationPort = "65535";
|
||||
}
|
||||
|
||||
if (this.protocol != null && this.maskProtocol == null) {
|
||||
this.maskProtocol = "255"; // 协议掩码这里填写255以确保覆盖大部分协议
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,14 @@ public class TaskCommandInfo {
|
||||
@JsonProperty("task_act")
|
||||
private String taskAct;
|
||||
|
||||
@Schema(description = "部门", example = "XXX")
|
||||
@JsonProperty("department")
|
||||
private String department;
|
||||
|
||||
@Schema(description = "局点", example = "北京")
|
||||
@JsonProperty("distribute_point")
|
||||
private String distributePoint;
|
||||
|
||||
@Schema(description = "指令下发频率", example = "30")
|
||||
@NotNull(message = "指令下发频率不能为空。")
|
||||
@JsonProperty("frequency")
|
||||
@@ -114,6 +122,8 @@ public class TaskCommandInfo {
|
||||
this.taskName = original.taskName;
|
||||
this.taskType = original.taskType;
|
||||
this.taskAct = original.taskAct;
|
||||
this.department = original.department;
|
||||
this.distributePoint = original.distributePoint;
|
||||
this.frequency = original.frequency;
|
||||
this.startTime = original.startTime;
|
||||
this.endTime = original.endTime;
|
||||
@@ -132,4 +142,8 @@ public class TaskCommandInfo {
|
||||
public void setProtocolNum() {
|
||||
this.fiveTupleWithMask.setProtocolNum();
|
||||
}
|
||||
|
||||
public void setMask() {
|
||||
this.fiveTupleWithMask.setMask();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user