1. 修改部分逻辑

This commit is contained in:
EnderByEndera
2024-01-22 23:40:48 +08:00
parent 095eb88eb3
commit 7432dbd5be
6 changed files with 31 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ import lombok.Data;
public class FiveTupleWithMask {
@Schema(description = "地址类型(IPv4 or IPv6)", example = "4")
@JsonProperty("addr_type")
private Integer addrType;
private Integer addrType = 4;
@Schema(description = "源IP", example = "192.168.104.14")
@Pattern(regexp = "^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$", message = "源IP无效IPv4地址")

View File

@@ -67,6 +67,10 @@ public class TaskCommandInfo {
@JsonProperty("is_valid")
private Boolean isValid = true;
@Schema(description = "指令是否已研判", example = "true")
@JsonProperty("is_judged")
private Boolean isJudged = true;
@Schema(description = "五元组信息")
@NotNull(message = "五元组信息不能为空。")
@JsonProperty("five_tuple_with_mask")

View File

@@ -36,7 +36,6 @@ public class CommandService {
commandInfo.setUUID(UUID.randomUUID().toString());
commandMapper.createCommand(commandInfo);
return commandInfo.getUUID();
}
public void createCommands(List<TaskCommandInfo> taskCommandInfos) {

View File

@@ -48,7 +48,6 @@ public class StateHandler {
}
protected Boolean handleResume(CommandService commandService, Long taskId) {
commandService.startCommandsByTaskId(taskId);
return true;
}