Quellcode durchsuchen

测试创建报警

lixing vor 3 Jahren
Ursprung
Commit
a65be45ea6

+ 12 - 12
src/main/java/com/persagy/apm/alarmservice/group/alarmrecord/controller/AlarmRecordController.java

@@ -388,18 +388,18 @@ public class AlarmRecordController {
 
     @PostMapping("/test")
     public void test() {
-//        AddAlarmRecordDTO addAlarmRecordDTO = new AddAlarmRecordDTO();
-//        addAlarmRecordDTO.setId("123");
-//        addAlarmRecordDTO.setTriggerTime(new Date());
-//        addAlarmRecordDTO.setObjId("123");
-//        addAlarmRecordDTO.setName("test");
-//        addAlarmRecordDTO.setItemCode("123");
-//        addAlarmRecordDTO.setLevel("1");
-//        try {
-//            alarmRecordService.create(addAlarmRecordDTO);
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//        }
+        AddAlarmRecordDTO addAlarmRecordDTO = new AddAlarmRecordDTO();
+        addAlarmRecordDTO.setId("1234");
+        addAlarmRecordDTO.setTriggerTime(new Date());
+        addAlarmRecordDTO.setObjId("123");
+        addAlarmRecordDTO.setName("test");
+        addAlarmRecordDTO.setItemCode("123");
+        addAlarmRecordDTO.setLevel("1");
+        try {
+            alarmRecordService.create(addAlarmRecordDTO);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 }