diff --git a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs index 3c8a8ba..c69f232 100644 --- a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs +++ b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs @@ -206,11 +206,11 @@ public class ConfigSubscribe : IJob Console.WriteLine("进入文件上传处理"); Console.WriteLine($"文件上传处理:{message}"); int flightType = data.flight_task.flight_type; - if (flightType == 1) // 不处理一键起飞媒体信息 + /*if (flightType == 1) // 不处理一键起飞媒体信息 { // todo 后续可能要存 break; - } + }*/ string flightId = data.file.ext.flight_id; var taskAssign = _manageApp.GetTaskAssignByFlightId(flightId); @@ -233,8 +233,7 @@ public class ConfigSubscribe : IJob FlightId = flightId, TaskId = taskId, ParentKey = "", - ObjectKey = folderKey[0], - WorkspaceId = executeTask.WorkspaceId, // todo 从任务中取来 + WorkspaceId = executeTask.WorkspaceId, Level = 1, }; parents.Add(parent1); @@ -244,7 +243,6 @@ public class ConfigSubscribe : IJob FlightId = flightId, TaskId = taskId, ParentKey = folderKey[0], - ObjectKey = folderKey[1], WorkspaceId = executeTask.WorkspaceId, Level = 2, }; @@ -255,7 +253,6 @@ public class ConfigSubscribe : IJob FlightId = flightId, TaskId = taskId, ParentKey = folderKey[1], - ObjectKey = folderKey[2], WorkspaceId = executeTask.WorkspaceId, Level = 3, }; @@ -290,7 +287,10 @@ public class ConfigSubscribe : IJob CreateTime = ((string)data.file.metadata.created_time).ToDateTime(), WorkspaceId = executeTask.WorkspaceId, ParentKey = folderKey[2], - Level = 4 + Level = 4, + Tid = result.tid, + Bid = result.bid, + FlightType = flightType }; // todo 添加事务 await _sqlSugarClient.Insertable(fileUpload).ExecuteCommandAsync(); @@ -497,7 +497,7 @@ public class ConfigSubscribe : IJob else { // 任务开始执行 - taskRecordExecute.Status = 1; // 任务执行中 + taskRecordExecute.Status = 0; // 任务执行中 Console.WriteLine($"任务执行响应 {code} {message}"); } @@ -507,6 +507,7 @@ public class ConfigSubscribe : IJob break; case "thing/product/*/osd": + // todo 处理保存 减少三位,保存 Console.WriteLine($"osd消息: {message}"); break; default: @@ -515,6 +516,12 @@ public class ConfigSubscribe : IJob } } + public DateTime GetDateTimeFromSeconds(long miliseconds) + { + var seconds = miliseconds / 1000; // 去除末尾三位 + return DateTimeOffset.FromUnixTimeSeconds(seconds).DateTime; + } + public static Dictionary ErrorMap = new() { { 312014, "设备升级中,请勿重复操作" },