修改websocket配置
This commit is contained in:
@@ -31,9 +31,9 @@ public class FaceCaptureConsumer implements RocketMQListener<MessageExt> {
|
||||
|
||||
@Override
|
||||
public void onMessage(MessageExt ext) {
|
||||
log.info("消费人脸抓拍数据,数据长度={}", ext.getBody().length);
|
||||
try {
|
||||
FaceCapture capture = JSONObject.parseObject(ext.getBody(), FaceCapture.class);
|
||||
log.info("消费人脸抓拍数据,设备={},数据长度={}", capture.getDeviceIp(), ext.getBody().length);
|
||||
eventAlarmReportService.handleCaptureImg(capture.getDeviceIp(), capture.getSmallImg(), capture.getBigImg());
|
||||
} catch (Exception e) {
|
||||
log.error("消费人脸抓拍数据处理失败,", e);
|
||||
|
@@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -312,7 +313,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService, Applic
|
||||
Boolean insert = alarmEventProcessService.insert(process);
|
||||
log.info("事件处理信息写入完成,result= {}", insert);
|
||||
// 进行消息推送
|
||||
webSocketMessageService.publishMessage(List.of(bo.getSolveId()), WebSocketMsgType.ALARM_MSG, sisAlarmEvents);
|
||||
webSocketMessageService.publishMessage(List.of(bo.getSolveId()), WebSocketMsgType.ALARM_MSG, JSONObject.toJSONString(sisAlarmEvents));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user