Browse Source

安全风险

master
PoffyZhang 1 year ago
parent
commit
5f26ef979a
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java

+ 3
- 1
pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/EarlyWarningManage.java View File

@@ -66,14 +66,17 @@ public class EarlyWarningManage {
case PROCESS_WARNING: case PROCESS_WARNING:
content = convertContent(noticeContent,project.getProjectName(), content = convertContent(noticeContent,project.getProjectName(),
InstTypeEnum.getByCode(biz),timeout); InstTypeEnum.getByCode(biz),timeout);
records.setRuleType(WarningRuleTypeEnum.PROCESS_WARNING.getCode());
break; break;
case DECLARED_WARNING: case DECLARED_WARNING:
content = convertContent(noticeContent,project.getProjectName(), content = convertContent(noticeContent,project.getProjectName(),
WarningFlowTypeEnum.getByCode(biz),timeout); WarningFlowTypeEnum.getByCode(biz),timeout);
records.setRuleType(WarningRuleTypeEnum.DECLARED_WARNING.getCode());
break; break;
case OPERATION_WARNING: case OPERATION_WARNING:
content = convertContent(noticeContent,project.getProjectName(), content = convertContent(noticeContent,project.getProjectName(),
WarningOperationTypeEnum.getByCode(biz),timeout); WarningOperationTypeEnum.getByCode(biz),timeout);
records.setRuleType(WarningRuleTypeEnum.OPERATION_WARNING.getCode());
break; break;
default: default:
log.info("匹配不到 规则类型"); log.info("匹配不到 规则类型");
@@ -90,7 +93,6 @@ public class EarlyWarningManage {
records.setNoticeMethod(noticeMethod); records.setNoticeMethod(noticeMethod);
records.setNoticeContent(content); records.setNoticeContent(content);
records.setProjectName(project.getProjectName()); records.setProjectName(project.getProjectName());
records.setRuleType(WarningRuleTypeEnum.PROCESS_WARNING.getCode());
records.setWarningUsername(Objects.nonNull(user) ? user.getUsername() : StringUtils.EMPTY); records.setWarningUsername(Objects.nonNull(user) ? user.getUsername() : StringUtils.EMPTY);
records.setWarningEmployeecode(employeeCode); records.setWarningEmployeecode(employeeCode);
earlyWarningRecordsService.save(records); earlyWarningRecordsService.save(records);


Loading…
Cancel
Save