Commit c1cf0c05 authored by 赵啸非's avatar 赵啸非

添加前端页面

parent 6fba9db2
......@@ -69,6 +69,7 @@ public class DownMsgTask implements Runnable {
TopicPartitionInfo info = TopicPartitionInfo.builder().exchangeName(exchangeName).topic(Constant.DOWN_TOPIC + deviceEntity.getDeviceMac()).build();
TbQueueMsgHeaders header = new DefaultTbQueueMsgHeaders();
header.put(MessageHeader.MESSAGETYPE, item.getMessageType());
header.put(MessageHeader.DEVICECODE, item.getDeviceCode());
header.put(MessageHeader.TIMESTAMP, item.getTimestamp().toString());
deviceService.sendDeviceMessage(deviceEntity, info, header, JSON.toJSONString(item.getData()), null);
......@@ -81,13 +82,13 @@ public class DownMsgTask implements Runnable {
deviceLogEntity.setDeviceCode(deviceEntity.getDeviceCode());
deviceLogEntity.setMessageHead(item.getMessageType());
deviceLogEntity.setContent(JSON.toJSONString(item.getData()));
deviceLogEntity.setLogType(LogTypeEnum.上报事件.getValue());
deviceLogEntity.setLogType(LogTypeEnum.下发服务.getValue());
deviceLogEntity.setCreateUserId(1L);
deviceLogEntity.setCreateTime(new Date());
deviceLogService.save(deviceLogEntity);
}
}else{
log.info("未找到设备,deviceCode:{}",item.getDeviceCode());
}
});
} catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment