| | |
| | | */ |
| | | public Light getLight(String deviceCode) { |
| | | Light one = getOne(Wrappers.<Light>lambdaQuery().eq(Light::getDeviceCode, deviceCode)); |
| | | if (one == null) { |
| | | return null; |
| | | } else { |
| | | Object o = redisService.get(LightKey.REPORT_MAC.key(deviceCode)); |
| | | if (o != null) { |
| | | one.setOnlineStatus(1); |
| | |
| | | one.setOnlineStatus(0); |
| | | } |
| | | return one; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | Light light = getLight(deviceCode); |
| | | if (light == null) { |
| | | log.error("单灯主动同步时间请求异常,单灯信息不存在!"); |
| | | return; |
| | | } |
| | | //单灯任务信息 |
| | | LightTaskPoleRelation lightTaskPoleRelation = SpringContextHolder.getBean(LightTaskPoleRelationService.class) |