xujiaheng 3 роки тому
батько
коміт
d2c553df30

+ 1 - 1
src/main/java/com/persagy/apm/alarmservice/project/alarmrule/service/impl/ProjectAlarmRuleServiceImpl.java

@@ -294,7 +294,7 @@ public class ProjectAlarmRuleServiceImpl extends ServiceImpl<ProjectAlarmRuleMap
             addProjectAlarmRuleObjRelDTO.setProjectAlarmRuleId(id);
             addProjectAlarmRuleObjRelDTO.setObjId(updateAlarmItemDTO.getObjId());
             addProjectAlarmRuleObjRelDTO.setProjectId(projectId);
-            addProjectAlarmRuleObjRelDTO.setOpen(1);
+            addProjectAlarmRuleObjRelDTO.setOpen(updateAlarmItemDTO.getOpen());
             addProjectAlarmRuleObjRelDTO.setObjName(updateAlarmItemDTO.getObjName());
             list.add(addProjectAlarmRuleObjRelDTO);
         }

+ 6 - 5
src/main/java/com/persagy/apm/alarmservice/project/alarmruleobjrel/model/dto/UpdateAlarmItemDTO.java

@@ -13,13 +13,14 @@ import javax.validation.constraints.NotNull;
 @Data
 @ApiModel(value = "更新项目报警规则与监测对象的关联入参")
 public class UpdateAlarmItemDTO {
-    
-    @ApiModelProperty(value = "报警对象ID", required = true)
-    @NotNull(message = "报警对象名称不能为空") // todo 更新校验规则
+
+    @ApiModelProperty("设备ID")
     private String objId;
 
-    @ApiModelProperty(value = "报警对象ID", required = true)
-    @NotNull(message = "报警对象名称不能为空") // todo 更新校验规则
+    @ApiModelProperty("设备名称")
     private String objName;
+
+    @ApiModelProperty("屏蔽状态 1-open、0- 屏蔽")
+    private Integer open;
     
 }