操作日志处理记录
This commit is contained in:
parent
19ff423fc2
commit
0424b6ae38
@ -557,7 +557,8 @@ namespace JiShe.IoT.DeviceAggregation
|
|||||||
{
|
{
|
||||||
Message = input.Serialize(),
|
Message = input.Serialize(),
|
||||||
};
|
};
|
||||||
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt<DeviceCacheInfos>(), input.PropertyList.Serialize());
|
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt<DeviceCacheInfos>(), input.PropertyList.Serialize());
|
||||||
|
|
||||||
|
|
||||||
if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.OneNET)
|
if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.OneNET)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -47,13 +47,13 @@ namespace JiShe.IoT
|
|||||||
var oneNETIssueMessageEntity = new DeviceTelemetryPacketTaskInfo()
|
var oneNETIssueMessageEntity = new DeviceTelemetryPacketTaskInfo()
|
||||||
{
|
{
|
||||||
DataBaseName = iotDBOptions.DataBaseName,
|
DataBaseName = iotDBOptions.DataBaseName,
|
||||||
DeviceType = $"{commandIssueInfo.DeviceType}",
|
DeviceType = $"{deviceInfo.DeviceType}",
|
||||||
DeviceAddress = commandIssueInfo.DeviceAddress,
|
DeviceAddress = deviceInfo.DeviceAddress,
|
||||||
IssueRawMessage = input.Serialize(),
|
IssueRawMessage = input.Serialize(),
|
||||||
IssuePayload = messageBody,
|
IssuePayload = messageBody,
|
||||||
IoTDataType = IoTDBDataTypeConst.Command,
|
IoTDataType = IoTDBDataTypeConst.Command,
|
||||||
TelemetrySource = (int)commandIssueInfo.SourceType,
|
TelemetrySource = (int)commandIssueInfo.SourceType,
|
||||||
IoTPlatform = (int)commandIssueInfo.IoTPlatform,
|
IoTPlatform = (int)deviceInfo.IoTPlatform,
|
||||||
IoTPlatformProductId = deviceInfo.IoTPlatformProductId,
|
IoTPlatformProductId = deviceInfo.IoTPlatformProductId,
|
||||||
IoTPlatformDeviceOpenInfo = deviceInfo.IoTPlatformDeviceOpenInfo,
|
IoTPlatformDeviceOpenInfo = deviceInfo.IoTPlatformDeviceOpenInfo,
|
||||||
IoTPlatformAccountId = deviceInfo.IoTPlatformAccountId,
|
IoTPlatformAccountId = deviceInfo.IoTPlatformAccountId,
|
||||||
@ -61,7 +61,7 @@ namespace JiShe.IoT
|
|||||||
IoTPlatformProductName = deviceInfo.IoTPlatformProductName,
|
IoTPlatformProductName = deviceInfo.IoTPlatformProductName,
|
||||||
RetryCount = 0,
|
RetryCount = 0,
|
||||||
IssueStatus = (int)DeviceCommandIssueStatusEnum.Unprocessed,
|
IssueStatus = (int)DeviceCommandIssueStatusEnum.Unprocessed,
|
||||||
LastIssueTime = DateTime.Now
|
LastIssueTime = DateTime.Now,
|
||||||
};
|
};
|
||||||
|
|
||||||
return oneNETIssueMessageEntity;
|
return oneNETIssueMessageEntity;
|
||||||
|
|||||||
@ -449,6 +449,7 @@ namespace JiShe.IoT
|
|||||||
};
|
};
|
||||||
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt<DeviceCacheInfos>(), input.Commands.Serialize());
|
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt<DeviceCacheInfos>(), input.Commands.Serialize());
|
||||||
|
|
||||||
|
|
||||||
await ioTDBDataChannelManageService.DeviceTelemetryTaskWriterAsync(DataChannelManage.DeviceTelemetryTaskDataChannel.Writer, (DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo));
|
await ioTDBDataChannelManageService.DeviceTelemetryTaskWriterAsync(DataChannelManage.DeviceTelemetryTaskDataChannel.Writer, (DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo));
|
||||||
|
|
||||||
await redisPubSubService.PublishReliableAsync(DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo);
|
await redisPubSubService.PublishReliableAsync(DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user