新增 支持蓝鲸智库多系统接入
This commit is contained in:
parent
8523c8ee8e
commit
c616581918
|
|
@ -40,9 +40,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"IIsConfig": {
|
"IIsConfig": {
|
||||||
"SdkType": null,
|
"SdkType": "netcore",
|
||||||
"WebSiteName": "",
|
"WebSiteName": "",
|
||||||
"LastEnvName": null,
|
"LastEnvName": "10楼刀片机",
|
||||||
"EnvPairList": [
|
"EnvPairList": [
|
||||||
{
|
{
|
||||||
"EnvName": "10楼刀片机",
|
"EnvName": "10楼刀片机",
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,15 @@ namespace VideoAnalysisCore.Controllers.Dto
|
||||||
/// 内容类型
|
/// 内容类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AttachmentsInfoType AttachmentsInfoType { get; set; }
|
public AttachmentsInfoType AttachmentsInfoType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 视频下载地址
|
||||||
|
/// </summary>
|
||||||
|
public string? VideoUrl { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 通知回调地址
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public string? CallBackUrl { get; set; }
|
||||||
}
|
}
|
||||||
public class NodePackageReq
|
public class NodePackageReq
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,8 @@ namespace VideoAnalysisCore.Controllers
|
||||||
NodeId = req.NodeId,
|
NodeId = req.NodeId,
|
||||||
TaskType = req.TaskType,
|
TaskType = req.TaskType,
|
||||||
SubjectType = req.SubjectType,
|
SubjectType = req.SubjectType,
|
||||||
|
VideoUrl =s.VideoUrl,
|
||||||
|
CallBackUrl=s.CallBackUrl
|
||||||
};
|
};
|
||||||
nodePackages.Add(np);
|
nodePackages.Add(np);
|
||||||
if (s.AttachmentsInfoType == AttachmentsInfoType.PPT)
|
if (s.AttachmentsInfoType == AttachmentsInfoType.PPT)
|
||||||
|
|
@ -109,7 +110,7 @@ namespace VideoAnalysisCore.Controllers
|
||||||
Type = req.TaskType,
|
Type = req.TaskType,
|
||||||
Subject = req.SubjectType,
|
Subject = req.SubjectType,
|
||||||
TagId = s.VideoCode,
|
TagId = s.VideoCode,
|
||||||
MediaUrl = string.Empty,
|
MediaUrl =s.VideoUrl,
|
||||||
MediaName = s.VideoName,
|
MediaName = s.VideoName,
|
||||||
PPTVideoCode = req.AnalyzeItems //»ñÈ¡ppt videoCode
|
PPTVideoCode = req.AnalyzeItems //»ñÈ¡ppt videoCode
|
||||||
.FirstOrDefault(x => x.AttachmentsInfoType == AttachmentsInfoType.PPT && s.StructurePageContentId == x.StructurePageContentId)
|
.FirstOrDefault(x => x.AttachmentsInfoType == AttachmentsInfoType.PPT && s.StructurePageContentId == x.StructurePageContentId)
|
||||||
|
|
|
||||||
|
|
@ -60,22 +60,37 @@ namespace VideoAnalysisCore.Job
|
||||||
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 已完成任务回调 数量{postData.Count}");
|
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 已完成任务回调 数量{postData.Count}");
|
||||||
if (postData.Count() == 0)
|
if (postData.Count() == 0)
|
||||||
return;
|
return;
|
||||||
var responseMessage = await new HttpClient()
|
//var responseMessage = await new HttpClient()
|
||||||
.PostAsJsonAsync(AppCommon.Config.Subsystem.蓝鲸智库.APIUrl + "/api/callback/platform/videosAnalyze", postData);
|
// .PostAsJsonAsync(AppCommon.Config.Subsystem.蓝鲸智库.APIUrl + "/api/callback/platform/videosAnalyze", postData);
|
||||||
if (responseMessage.IsSuccessStatusCode)
|
foreach (var item in taskArr) {
|
||||||
{
|
HttpResponseMessage responseMessage = null;
|
||||||
var res = await responseMessage.Content.ReadAsStringAsync();
|
if (!string.IsNullOrWhiteSpace(item.CallBackUrl))
|
||||||
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 回调结果 {res}");
|
{
|
||||||
|
responseMessage = await new HttpClient()
|
||||||
|
.PostAsJsonAsync(item.CallBackUrl, postData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
responseMessage = await new HttpClient()
|
||||||
|
.PostAsJsonAsync(AppCommon.Config.Subsystem.蓝鲸智库.APIUrl + "/api/callback/platform/videosAnalyze", postData);
|
||||||
|
}
|
||||||
|
if (responseMessage.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
var res = await responseMessage.Content.ReadAsStringAsync();
|
||||||
|
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 回调结果 {res}");
|
||||||
|
|
||||||
await nodePackageInfoDB.AsUpdateable(postData)
|
await nodePackageInfoDB.AsUpdateable(postData)
|
||||||
.UpdateColumns(it => new { it.SuccessTime })
|
.UpdateColumns(it => new { it.SuccessTime })
|
||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var res = await responseMessage.Content.ReadAsStringAsync();
|
var res = await responseMessage.Content.ReadAsStringAsync();
|
||||||
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 回调失败!!! {responseMessage.StatusCode} {res}");
|
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 回调失败!!! {responseMessage.StatusCode} {res}");
|
||||||
|
}
|
||||||
|
await Task.Delay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,5 +71,17 @@ namespace VideoAnalysisCore.Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("创建时间")]
|
[DisplayName("创建时间")]
|
||||||
public DateTime CreateTime { get; set; } =DateTime.Now;
|
public DateTime CreateTime { get; set; } =DateTime.Now;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视频下载地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(Length = 500)]
|
||||||
|
public string VideoUrl { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 通知回调地址
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
[SugarColumn(Length = 500)]
|
||||||
|
public string CallBackUrl { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue