发送信息和告警故障
This commit is contained in:
@ -108,7 +108,8 @@ public class DeviceBJQBizService {
|
||||
log.info("发送信息设备发送信息失败:{}" ,deviceId);
|
||||
throw new ServiceException("发送指令失败");
|
||||
}
|
||||
|
||||
//发送消息
|
||||
messageSending(device.getDeviceImei());
|
||||
}
|
||||
|
||||
|
||||
@ -526,8 +527,9 @@ public class DeviceBJQBizService {
|
||||
log.info("设备发送告警信息信息失败:{}" ,deviceId);
|
||||
throw new ServiceException("设备发送告警信息信息失败");
|
||||
}
|
||||
|
||||
messageSending(device.getDeviceImei());
|
||||
}
|
||||
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("发送告警信息指令失败");
|
||||
@ -535,6 +537,11 @@ public class DeviceBJQBizService {
|
||||
return 1;
|
||||
}
|
||||
|
||||
private void messageSending(String deviceImei){
|
||||
String sendMessageIng = GLOBAL_REDIS_KEY+ DEVICE_KEY_PREFIX + deviceImei + ":messageSending";
|
||||
RedisUtils.setCacheObject(sendMessageIng, "1", Duration.ofDays(1));
|
||||
}
|
||||
|
||||
private boolean getDeviceStatus(String deviceImei) {
|
||||
String deviceOnlineStatusRedisKey = GlobalConstants.GLOBAL_REDIS_KEY+ DEVICE_KEY_PREFIX+ deviceImei + DeviceRedisKeyConstants.DEVICE_ONLINE_STATUS_KEY_PREFIX ;
|
||||
return RedisUtils.getCacheObject(deviceOnlineStatusRedisKey) == null;
|
||||
|
||||
Reference in New Issue
Block a user