| | |
| | | package com.ard.sample.manage.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ard.common.core.redis.RedisConst; |
| | | import com.ard.common.core.redis.RedisOpsUtils; |
| | | import com.ard.ossdock.service.impl.OssDockServiceContext; |
| | | import com.ard.sample.component.websocket.enums.MessageType; |
| | | import com.ard.sample.component.websocket.handler.DockWebSocketHandler; |
| | | import com.ard.sample.manage.model.dto.DeviceDTO; |
| | |
| | | |
| | | @Autowired |
| | | protected ObjectMapper _objectMapper; |
| | | |
| | | @Resource |
| | | private OssDockServiceContext _ossService; |
| | | |
| | | /** |
| | | * 定时任务,每2秒取一次机场设备的在线状态,如已离线更新状态 |
| | |
| | | |
| | | // 发送给websocket客户端 |
| | | _dockWebSocketHandler.sendMessageToSubscribers(device.getDeviceSn(), MessageType.STATE.getType(), json, ""); |
| | | log.info("发送设备状态{}到websocket客户端:{}", MessageType.STATE.getType(), json); |
| | | } |
| | | } |
| | | |