|
|
|
@ -206,12 +206,6 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
Console.WriteLine("进入文件上传处理");
|
|
|
|
|
Console.WriteLine($"文件上传处理:{message}");
|
|
|
|
|
int flightType = data.flight_task.flight_type;
|
|
|
|
|
/*if (flightType == 1) // 不处理一键起飞媒体信息
|
|
|
|
|
{
|
|
|
|
|
// todo 后续可能要存
|
|
|
|
|
break;
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
string flightId = data.file.ext.flight_id;
|
|
|
|
|
var taskAssign = _manageApp.GetTaskAssignByFlightId(flightId);
|
|
|
|
|
var taskId = taskAssign.TaskId;
|
|
|
|
@ -220,10 +214,10 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
.SingleAsync(a => a.Id == taskId);
|
|
|
|
|
string objectKey = data.file.object_key;
|
|
|
|
|
var folderKey = ((string)data.file.object_key).Split("/");
|
|
|
|
|
var parentKey = folderKey[^2];
|
|
|
|
|
var parentKey = folderKey[2];
|
|
|
|
|
var isExist = await _sqlSugarClient
|
|
|
|
|
.Queryable<LasaMediaFile>()
|
|
|
|
|
.Where(x => x.ObjectKey.Equals(parentKey)).CountAsync();
|
|
|
|
|
.Where(x => x.Name.Equals(parentKey)).CountAsync();
|
|
|
|
|
if (isExist == 0)
|
|
|
|
|
{
|
|
|
|
|
var parents = new List<LasaMediaFile>(3);
|
|
|
|
@ -233,6 +227,7 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
FlightId = flightId,
|
|
|
|
|
TaskId = taskId,
|
|
|
|
|
ParentKey = "",
|
|
|
|
|
Name = folderKey[0],
|
|
|
|
|
WorkspaceId = executeTask.WorkspaceId,
|
|
|
|
|
Level = 1,
|
|
|
|
|
};
|
|
|
|
@ -243,6 +238,7 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
FlightId = flightId,
|
|
|
|
|
TaskId = taskId,
|
|
|
|
|
ParentKey = folderKey[0],
|
|
|
|
|
Name = folderKey[1],
|
|
|
|
|
WorkspaceId = executeTask.WorkspaceId,
|
|
|
|
|
Level = 2,
|
|
|
|
|
};
|
|
|
|
@ -253,6 +249,7 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
FlightId = flightId,
|
|
|
|
|
TaskId = taskId,
|
|
|
|
|
ParentKey = folderKey[1],
|
|
|
|
|
Name = folderKey[2],
|
|
|
|
|
WorkspaceId = executeTask.WorkspaceId,
|
|
|
|
|
Level = 3,
|
|
|
|
|
};
|
|
|
|
|