diff --git a/TelpoPush.WanJiaAn.Worker/Handlers/WanJiaAnProcess.cs b/TelpoPush.WanJiaAn.Worker/Handlers/WanJiaAnProcess.cs index 84646c9..34f8024 100644 --- a/TelpoPush.WanJiaAn.Worker/Handlers/WanJiaAnProcess.cs +++ b/TelpoPush.WanJiaAn.Worker/Handlers/WanJiaAnProcess.cs @@ -56,11 +56,11 @@ namespace TelpoPush.WanJiaAn.Worker.Handlers if (string.IsNullOrEmpty(imei)) { - _logger.LogInformation($"[数据信息不完整] imei信息不存在:{message}"); + _logger.LogInformation($"[数据信息不完整] device_id信息不存在:{message}"); isHandle = false; } - else - await _redis.GetGpsDevice(imei); + //else + // await _redis.GetGpsDevice(imei); } else { @@ -78,24 +78,27 @@ namespace TelpoPush.WanJiaAn.Worker.Handlers { lock (_syncLocker) { + #region 注释 Headers 解析 //Headers 解析 - HeadersDto headersDto = new HeadersDto(); - try - { - foreach (var item in headers) - { - if (item.Key == KafkaHeader.DataType) - headersDto.DataType = BitConverter.ToInt32(item.GetValueBytes(), 0); - else if (item.Key == KafkaHeader.AlarmType) - headersDto.AlarmType = BitConverter.ToInt32(item.GetValueBytes(), 0); - else if (item.Key == KafkaHeader.OperType) - headersDto.OperType = BitConverter.ToInt32(item.GetValueBytes(), 0); - } - } - catch (Exception ex) - { - _logger.LogError($"当前工作线程Headers异常,{ex.Message}|{ex.Source}|{ex.StackTrace}"); - } + //HeadersDto headersDto = new HeadersDto(); + //try + //{ + // foreach (var item in headers) + // { + // if (item.Key == KafkaHeader.DataType) + // headersDto.DataType = BitConverter.ToInt32(item.GetValueBytes(), 0); + // else if (item.Key == KafkaHeader.AlarmType) + // headersDto.AlarmType = BitConverter.ToInt32(item.GetValueBytes(), 0); + // else if (item.Key == KafkaHeader.OperType) + // headersDto.OperType = BitConverter.ToInt32(item.GetValueBytes(), 0); + // } + //} + //catch (Exception ex) + //{ + // _logger.LogError($"当前工作线程Headers异常,{ex.Message}|{ex.Source}|{ex.StackTrace}"); + //} + + #endregion try { #region 注释 @@ -221,18 +224,10 @@ namespace TelpoPush.WanJiaAn.Worker.Handlers // _logger.LogInformation($"数据未处理(历史数据):{JsonConvert.SerializeObject(dataStatus)}"); #endregion - switch (topic) { case "topic.wanjiaan.push.telpo": - switch (headersDto.DataType) - { - case (int)MqDataType.WanJiaAnInfo: //定位消息 - DataServicePusWanJiaAn(model, imei); - break; - default: - break; - } + DataServicePusWanJiaAn(model); break; default: break; @@ -248,7 +243,7 @@ namespace TelpoPush.WanJiaAn.Worker.Handlers } //位置 - public async Task DataServicePusWanJiaAn(BaseModel model,string imei) + public async Task DataServicePusWanJiaAn(BaseModel model) { if (model.data != null) {