AlertMessage:
1、alertmessage添加is_distribute(待删除)、command_uuid、create_time、modify_time、alert_message_uuid属性。 2、AlertMessageController添加queryAlarmsByCommandId方法,根据commandUUID查询alertmessage 3、AlertMessageMapper添加新建、查询alertmessage 4、service重写处理alertmessage逻辑,现在alertmessage的isdistribute不需要了,需要删除 Command: 1、service添加updateCommandVaid方法,用于对研判后任务生成的指令研判下发 Task: 1、TaskCommandInfo类添加taskStatus,减少AlertMessageService的查询,并做了标注 2、Controller添加研判后任务下发指令\停止指令的方法validCommandInfoByTaskId StaticRule、DynamicRule、WhiteList: 1、添加分页查询返回数据总数
This commit is contained in:
@@ -103,7 +103,8 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
|
||||
return ResponseResult.ok()
|
||||
.setData("success", true)
|
||||
.setData("dynamic_rule_list", dynamicRuleService.queryDynamicRuleObject(dynamicRuleName, dynamicRuleId,
|
||||
protectObjectSourceSystem, creator, page, pageSize));
|
||||
protectObjectSourceSystem, creator, page, pageSize))
|
||||
.setData("dynamic_rule_total_num",dynamicRuleService.queryDynamicRuleTotalNum());
|
||||
}
|
||||
|
||||
//详情查看?? 就是按id查询吧
|
||||
|
||||
@@ -28,9 +28,9 @@ public interface DynamicRuleControllerApi {
|
||||
content = @Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(
|
||||
// title = "ResponseResult和DynamicRule的组合模型",
|
||||
// description = "ResponseResult的data内DynamicRule",
|
||||
// anyOf = {ResponseResult.class, DynamicRuleObject.class})
|
||||
title = "ResponseResult和DynamicRule的组合模型",
|
||||
description = "ResponseResult的data内DynamicRule",
|
||||
anyOf = {ResponseResult.class, DynamicRuleObject.class},
|
||||
implementation = ResponseResult.class)
|
||||
)
|
||||
)
|
||||
@@ -84,7 +84,11 @@ public interface DynamicRuleControllerApi {
|
||||
description = "返回修改对象结果",
|
||||
content = @Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = ResponseResult.class)
|
||||
schema = @Schema(
|
||||
title = "ResponseResult和DynamicRule的组合模型",
|
||||
description = "ResponseResult的data内DynamicRule",
|
||||
anyOf = {ResponseResult.class, DynamicRuleObject.class},
|
||||
implementation = ResponseResult.class)
|
||||
)
|
||||
)
|
||||
},
|
||||
|
||||
@@ -40,4 +40,6 @@ public interface DynamicRuleMapper {
|
||||
boolean newDynamicRulProtectObjectsConcat(Integer dynamicRuleId, List<Integer> protectObjectIds);
|
||||
|
||||
boolean queryProtectObjectById(Integer protectObjectId);
|
||||
|
||||
Integer queryDynamicRuleTotalNum();
|
||||
}
|
||||
|
||||
@@ -160,4 +160,8 @@ public class DynamicRuleService {
|
||||
return dynamicRuleMapper.queryDynamicRuleObject(dynamicRuleName, dynamicRuleId,
|
||||
templateSourceSystem, creator, page, pageSize);
|
||||
}
|
||||
|
||||
public Integer queryDynamicRuleTotalNum() {
|
||||
return dynamicRuleMapper.queryDynamicRuleTotalNum();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class StaticRuleController implements StaticRuleControllerApi {
|
||||
//以Excel方式批量导入静态规则
|
||||
@PostMapping("/upload")
|
||||
@Override
|
||||
public ResponseResult uploadFile(MultipartFile uploadFile) throws IOException {
|
||||
public ResponseResult uploadFile(@RequestPart("file")MultipartFile uploadFile) throws IOException {
|
||||
EasyExcel.read(uploadFile.getInputStream(), StaticRuleObject.class,
|
||||
new StaticRuleDataListener(staticRuleService)).sheet().doRead();
|
||||
return ResponseResult.ok();
|
||||
@@ -137,7 +137,9 @@ public class StaticRuleController implements StaticRuleControllerApi {
|
||||
List<StaticRuleObject> pageResult = staticRuleService.queryStaticRule(
|
||||
static_rule_name, static_rule_id,
|
||||
static_rule_creator, static_rule_ip, page, pageSize);
|
||||
return ResponseResult.ok().setData("static_rule_list", pageResult);
|
||||
return ResponseResult.ok()
|
||||
.setData("static_rule_list", pageResult)
|
||||
.setData("static_rule_total_num",staticRuleService.queryStaticRuleTotalNum());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -28,7 +29,8 @@ public interface StaticRuleControllerApi {
|
||||
description = "返回新增对象结果",
|
||||
content = @Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = ResponseResult.class)
|
||||
schema = @Schema(
|
||||
implementation = ResponseResult.class)
|
||||
)
|
||||
)
|
||||
},
|
||||
@@ -52,7 +54,7 @@ public interface StaticRuleControllerApi {
|
||||
requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||
description = "Excel文件")
|
||||
)
|
||||
ResponseResult uploadFile(MultipartFile uploadFile) throws IOException;
|
||||
ResponseResult uploadFile(@RequestPart("file")MultipartFile uploadFile) throws IOException;
|
||||
|
||||
@Operation(
|
||||
summary = "下载静态规则模板",
|
||||
|
||||
@@ -38,4 +38,6 @@ public interface StaticRuleMapper {
|
||||
Integer queryAuditStatusById(Integer id);
|
||||
|
||||
Boolean updateAuditStatusById(Integer id, Integer auditStatus);
|
||||
|
||||
Integer queryStaticRuleTotalNum();
|
||||
}
|
||||
|
||||
@@ -147,4 +147,8 @@ public class StaticRuleService {
|
||||
public void deleteStaticRuleById(Integer id) {
|
||||
staticRuleMapper.deleteStaticRuleById(id);
|
||||
}
|
||||
|
||||
public Integer queryStaticRuleTotalNum() {
|
||||
return staticRuleMapper.queryStaticRuleTotalNum();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user