| | |
| | | package com.ard.sample.manage.service.impl; |
| | | |
| | | import com.ard.common.core.domain.model.LoginUser; |
| | | import com.ard.common.core.redis.RedisConst; |
| | | import com.ard.common.core.redis.RedisOpsUtils; |
| | | import com.ard.common.utils.SecurityUtils; |
| | | import com.ard.sample.common.model.ResponseResult; |
| | | import com.ard.sample.component.websocket.enums.MessageType; |
| | | import com.ard.sample.component.websocket.handler.DockWebSocketHandler; |
| | |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.net.URL; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | @Scheduled(cron = "0/2 * * * * ?") |
| | | public void cronOnlineTask() { |
| | | List<DeviceDTO> devicesList = _deviceService.getDevicesTopoForWeb(); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | for (DeviceDTO device : devicesList) { |
| | | //String key = "online:" + device.getDeviceSn(); |
| | | //System.out.println("在线状态:"+RedisOpsUtils.checkExist(key)); |