| | |
| | | list().forEach( |
| | | xiXun -> { |
| | | RedisDeviceStatus deviceStatus = new RedisDeviceStatus(); |
| | | deviceStatus.setDeviceId(xiXun.getLightemitControlCode()); |
| | | boolean ledOnLine = lightemitUtils.getLedOnLine(xiXun.getLightemitControlCode()); |
| | | if (ledOnLine) { |
| | | deviceStatus.setStatus(0); |
| | | } else { |
| | | deviceStatus.setStatus(1); |
| | | } |
| | | redisUtils.set(DeviceRedisKey.XIXUN + xiXun.getLightemitControlCode(), deviceStatus); |
| | | redisUtils.set(DeviceRedisKey.XIXUN + xiXun.getLightemitControlCode(), JSON.toJSONString(deviceStatus)); |
| | | // redisUtils.delete(DeviceRedisKey.XIXUN + xiXun.getLightemitControlCode()); |
| | | } |
| | | ); |
| | | } |