|
|
@@ -134,16 +134,16 @@ public class HikIsapiService {
|
|
|
public void handleAlarmCallback(String jsonPayload) {
|
|
|
try {
|
|
|
log.info("收到告警回调: {}", jsonPayload);
|
|
|
-
|
|
|
+
|
|
|
// 解析JSON
|
|
|
IotVideoAlarmSaveReqVO alarmEvent = objectMapper.readValue(
|
|
|
jsonPayload, IotVideoAlarmSaveReqVO.class);
|
|
|
- // 保存到数据库
|
|
|
- iotVideoAlarmService.createIotVideoAlarm(alarmEvent);
|
|
|
- // 触发告警处理流程
|
|
|
- alarmEventService.processAlarmEvent(alarmEvent);
|
|
|
-
|
|
|
-
|
|
|
+ if (!"AIOP_Video".equals(alarmEvent.getEventType())) {
|
|
|
+ // 保存到数据库
|
|
|
+ iotVideoAlarmService.createIotVideoAlarm(alarmEvent);
|
|
|
+ // 触发告警处理流程
|
|
|
+ alarmEventService.processAlarmEvent(alarmEvent);
|
|
|
+ }
|
|
|
} catch (JsonProcessingException e) {
|
|
|
log.error("JSON解析失败: {}", jsonPayload, e);
|
|
|
throw new RuntimeException("JSON解析失败", e);
|