From 977faaef75919a3b46828f204117c026b18d98f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Tue, 4 Mar 2025 15:41:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5=20=E8=93=9D=E9=B2=B8?= =?UTF-8?q?=E6=99=BA=E5=BA=93=E7=B1=BB=20=E4=BC=98=E5=8C=96=20=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E6=95=B0=E6=8D=AE=E5=BA=93=E5=BC=95=E5=85=A5=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VideoAnalysis/Controllers/ApiController.cs | 237 ++++++++++-------- VideoAnalysis/Controllers/Dto/ApiDto.cs | 20 ++ VideoAnalysis/Program.cs | 18 +- VideoAnalysis/appsettings.json | 16 +- .../AICore/GPT/ChatGPT/Chat_GPT.cs | 1 + .../AICore/GPT/DeepSeek/DeepSeek_GPT.cs | 14 +- .../AICore/GPT/Dto/QuestionRes.cs | 1 + VideoAnalysisCore/Common/AppCommon.cs | 25 +- VideoAnalysisCore/Common/CoravelExpand.cs | 31 +++ VideoAnalysisCore/Common/DownloadFile.cs | 6 +- VideoAnalysisCore/Common/RedisExpand.cs | 9 + VideoAnalysisCore/Common/Repository.cs | 23 +- VideoAnalysisCore/Common/SqlSugarExpand.cs | 14 +- VideoAnalysisCore/Enum/TaskTypeEnum.cs | 10 +- VideoAnalysisCore/Interface/IKnowsDB.cs | 15 -- VideoAnalysisCore/Job/UnprocessedVideoJob.cs | 28 +++ .../Model/{ => Dto}/HotwordMode.cs | 0 .../Model/蓝鲸智库/Attachments.cs | 182 ++++++++++++++ .../Model/蓝鲸智库/FileContent.cs | 128 ++++++++++ .../Model/蓝鲸智库/FileContentMaterial.cs | 66 +++++ .../Model/蓝鲸智库/FileDirectory.cs | 161 ++++++++++++ .../Model/{ => 蓝鲸智库}/KnowledgeInfo.cs | 8 +- VideoAnalysisCore/Model/蓝鲸智库/Material.cs | 110 ++++++++ VideoAnalysisCore/VideoAnalysisCore.csproj | 1 + 24 files changed, 955 insertions(+), 169 deletions(-) create mode 100644 VideoAnalysisCore/Common/CoravelExpand.cs delete mode 100644 VideoAnalysisCore/Interface/IKnowsDB.cs create mode 100644 VideoAnalysisCore/Job/UnprocessedVideoJob.cs rename VideoAnalysisCore/Model/{ => Dto}/HotwordMode.cs (100%) create mode 100644 VideoAnalysisCore/Model/蓝鲸智库/Attachments.cs create mode 100644 VideoAnalysisCore/Model/蓝鲸智库/FileContent.cs create mode 100644 VideoAnalysisCore/Model/蓝鲸智库/FileContentMaterial.cs create mode 100644 VideoAnalysisCore/Model/蓝鲸智库/FileDirectory.cs rename VideoAnalysisCore/Model/{ => 蓝鲸智库}/KnowledgeInfo.cs (93%) create mode 100644 VideoAnalysisCore/Model/蓝鲸智库/Material.cs diff --git a/VideoAnalysis/Controllers/ApiController.cs b/VideoAnalysis/Controllers/ApiController.cs index d8846c2..1b25a3e 100644 --- a/VideoAnalysis/Controllers/ApiController.cs +++ b/VideoAnalysis/Controllers/ApiController.cs @@ -98,34 +98,6 @@ namespace Learn.VideoAnalysis.Controllers return Ok(resStr); } - [NonAction] - private static List MergeTimeBases(IEnumerable timeBases) - { - if (timeBases == null || timeBases.Count() == 0) - { - return new List(); - } - var mergedList = new List(); - // ʼϲ - var current = timeBases.First(); - current.Content = string.Empty; - foreach (var next in timeBases) - { - // ͬչʱ - if (current.TimeBaseType == next.TimeBaseType) - current.End = Math.Max(current.End, next.End); - else - { - // Ͳͬǰʱμбʼʱ - mergedList.Add(current); - current = next; - current.Content = string.Empty; - } - } - // ʱ - mergedList.Add(current); - return mergedList; - } /// /// ¿ʼִGPTtaskId/tagIdѡһ @@ -154,79 +126,6 @@ namespace Learn.VideoAnalysis.Controllers return Ok(); } - /// - /// ȡƵ֪ʶƬtaskId/tagIdѡһ - /// - /// - /// Զid - /// - [HttpGet(Name = "TaskKnowInfo")] - public async Task TaskKnowInfo(long taskId, string? tagId) - { - if (taskId == 0 && string.IsNullOrEmpty(tagId)) - return BadRequest(); - var task = await videoTaskDB.AsQueryable() - .WhereIF(taskId != 0, s => s.Id == taskId) - .WhereIF(!string.IsNullOrEmpty(tagId), s => s.TagId == tagId) - .FirstAsync(); - if(task is null) - return BadRequest("Ч"); - - var konwArr = await videoKonwDB.AsQueryable() - .Where(s=>s.VideoTaskId == task.Id) - .ToArrayAsync(); - if (konwArr is null || konwArr.Length ==0) - return BadRequest("Ч"); - return Ok(new TaskKnowRes() - { - TagId = task.TagId, - Status = task.LastEnum, - VideoTaskId = task.Id, - KnowBlockArr = konwArr - .GroupBy(s=>s.StartTime) - .Select(s=>new TaskKnowBlock() - { - Id = s.First().Id, - Content = s.First().Content, - StartTime = s.First().StartTime, - EndTime = s.First().EndTime, - Theme =s.First().Theme, - Know=s.Select(x=>new TaskKnowInfo() - { - Id=x.Id, - KnowPoint=x.KnowPoint, - KnowPointId = x.KnowPointId - }).ToArray() - }).ToArray() - }); - } - /// - /// ȡƵϢtaskId/tagIdѡһ - /// - /// - /// Զid - /// - [HttpGet(Name = "TaskInfo")] - public async Task TaskInfo(long taskId,string? tagId) - { - if(taskId == 0 && string.IsNullOrEmpty(tagId)) - return BadRequest(); - var task = await videoTaskDB.AsQueryable() - .WhereIF(taskId!=0, s => s.Id == taskId) - .WhereIF(!string.IsNullOrEmpty(tagId), s => s.TagId == tagId) - .FirstAsync(); - if (task is null) - return BadRequest(); - var taskData = task.ChatAnalysis.Adapt(); - if (taskData is null) - return BadRequest(); - taskData.Status = task.LastEnum; - if (task.LastEnum != RedisChannelEnum.EndTask) - return BadRequest(taskData); - if (taskData != null && taskData.TimeBase != null) - taskData.TimeBase = MergeTimeBases(taskData.TimeBase); - return Ok(taskData); - } /// /// @@ -241,6 +140,7 @@ namespace Learn.VideoAnalysis.Controllers , msg); return Ok(); } + /// /// Ƶ /// @@ -274,5 +174,140 @@ namespace Learn.VideoAnalysis.Controllers RedisExpand.Redis.LPush(RedisExpandKey.ChannelKey, task.Id); return Ok(task.Id); } + + + /// + /// ǿ_ļڵ + /// + /// + /// + [HttpPost(Name = "ZY_NodeMonitoring")] + public async Task ZY_NodeMonitoring(NodeMonitoringReq req) + { + //if (!ModelState.IsValid) return BadRequest(ModelState); + + // + //task.Id = await videoTaskDB.InsertReturnBigIdentityAsync(task); + //var hashEntries = task.GetType() + // .GetProperties(BindingFlags.Public | BindingFlags.Instance) + // .ToDictionary(s => s.Name, s => s.GetValue(task)); + //RedisExpand.Redis.HMSet(RedisExpandKey.Task(task.Id), hashEntries); + //RedisExpand.Redis.LPush(RedisExpandKey.ChannelKey, task.Id); + return Ok(); + } + + + + + + ///// + ///// ȡƵ֪ʶƬtaskId/tagIdѡһ + ///// + ///// + ///// Զid + ///// + //[HttpGet(Name = "TaskKnowInfo")] + //public async Task TaskKnowInfo(long taskId, string? tagId) + //{ + // if (taskId == 0 && string.IsNullOrEmpty(tagId)) + // return BadRequest(); + // var task = await videoTaskDB.AsQueryable() + // .WhereIF(taskId != 0, s => s.Id == taskId) + // .WhereIF(!string.IsNullOrEmpty(tagId), s => s.TagId == tagId) + // .FirstAsync(); + // if (task is null) + // return BadRequest("Ч"); + + // var konwArr = await videoKonwDB.AsQueryable() + // .Where(s => s.VideoTaskId == task.Id) + // .ToArrayAsync(); + // if (konwArr is null || konwArr.Length == 0) + // return BadRequest("Ч"); + // return Ok(new TaskKnowRes() + // { + // TagId = task.TagId, + // Status = task.LastEnum, + // VideoTaskId = task.Id, + // KnowBlockArr = konwArr + // .GroupBy(s => s.StartTime) + // .Select(s => new TaskKnowBlock() + // { + // Id = s.First().Id, + // Content = s.First().Content, + // StartTime = s.First().StartTime, + // EndTime = s.First().EndTime, + // Theme = s.First().Theme, + // Know = s.Select(x => new TaskKnowInfo() + // { + // Id = x.Id, + // KnowPoint = x.KnowPoint, + // KnowPointId = x.KnowPointId + // }).ToArray() + // }).ToArray() + // }); + //} + ///// + ///// ȡƵϢtaskId/tagIdѡһ + ///// + ///// + ///// Զid + ///// + //[HttpGet(Name = "TaskInfo")] + //public async Task TaskInfo(long taskId, string? tagId) + //{ + // if (taskId == 0 && string.IsNullOrEmpty(tagId)) + // return BadRequest(); + // var task = await videoTaskDB.AsQueryable() + // .WhereIF(taskId != 0, s => s.Id == taskId) + // .WhereIF(!string.IsNullOrEmpty(tagId), s => s.TagId == tagId) + // .FirstAsync(); + // if (task is null) + // return BadRequest(); + // var taskData = task.ChatAnalysis.Adapt(); + // if (taskData is null) + // return BadRequest(); + // taskData.Status = task.LastEnum; + // if (task.LastEnum != RedisChannelEnum.EndTask) + // return BadRequest(taskData); + // if (taskData != null && taskData.TimeBase != null) + // taskData.TimeBase = MergeTimeBases(taskData.TimeBase); + // return Ok(taskData); + //} + + + //[NonAction] + //private static List MergeTimeBases(IEnumerable timeBases) + //{ + // if (timeBases == null || timeBases.Count() == 0) + // { + // return new List(); + // } + // var mergedList = new List(); + // // ʼϲ + // var current = timeBases.First(); + // current.Content = string.Empty; + // foreach (var next in timeBases) + // { + // // ͬչʱ + // if (current.TimeBaseType == next.TimeBaseType) + // current.End = Math.Max(current.End, next.End); + // else + // { + // // Ͳͬǰʱμбʼʱ + // mergedList.Add(current); + // current = next; + // current.Content = string.Empty; + // } + // } + // // ʱ + // mergedList.Add(current); + // return mergedList; + //} + + + + + + } } diff --git a/VideoAnalysis/Controllers/Dto/ApiDto.cs b/VideoAnalysis/Controllers/Dto/ApiDto.cs index 5ad1098..7784f6f 100644 --- a/VideoAnalysis/Controllers/Dto/ApiDto.cs +++ b/VideoAnalysis/Controllers/Dto/ApiDto.cs @@ -7,6 +7,26 @@ using VideoAnalysisCore.Enum; namespace Learn.VideoAnalysis.Controllers.Dto { + /// + /// 视频处理 请求 + /// + public class NodeMonitoringReq + { + /// + /// 媒体路径 + /// + [Required(ErrorMessage = "文件节点ID是必填项")] + public string NodeId { get; set; } = string.Empty; + /// + /// 任务类型 + /// + public TaskTypeEnum? Type { get; set; } + /// + /// 自定义值 任务完成后附带通知 + /// + public string Tag { get; set; } = string.Empty; + + } /// /// 视频处理 请求 /// diff --git a/VideoAnalysis/Program.cs b/VideoAnalysis/Program.cs index 75f8d39..a51080b 100644 --- a/VideoAnalysis/Program.cs +++ b/VideoAnalysis/Program.cs @@ -59,7 +59,9 @@ namespace Learn.VideoAnalysis builder.Services.InitSqlSugar(); RedisExpand.Init(); Speaker.Init(); + CoravelExpand.Init(builder.Services); //SenseVoice.Init(); + //쳣 builder.Services.AddControllersWithViews(options => { options.Filters.Add(typeof(ExceptionFilter)); @@ -106,32 +108,26 @@ namespace Learn.VideoAnalysis app.UseSwaggerUI(); app.UseExceptionHandler("/Error"); } - //else - //{ - // app.UseExceptionHandler("/Login"); - //} - + //wwwroot ̬Ŀ¼ app.UseStaticFiles(); - + // Զ ̬Ŀ¼ app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(AppCommon.TaskCachedFile), RequestPath = "/video", - //OnPrepareResponse = ctx => // - //{ - // ctx.Context.Response.Headers[Microsoft.Net.Http.Headers.HeaderNames.CacheControl] = "public,max - age = 31536000"; - //} }); app.UseAntiforgery(); - app.MapRazorComponents() + app.MapRazorComponents() .AddInteractiveServerRenderMode(); //.AddInteractiveWebAssemblyRenderMode() //.AddAdditionalAssemblies(typeof(VideoAnalysisRazor._Imports).Assembly); app.MapControllers(); + //Զ Ӧ SqlSugarExpand.InitDB(); + CoravelExpand.Run(app.Services); app.Run(); diff --git a/VideoAnalysis/appsettings.json b/VideoAnalysis/appsettings.json index dc6ee59..696ed04 100644 --- a/VideoAnalysis/appsettings.json +++ b/VideoAnalysis/appsettings.json @@ -45,9 +45,17 @@ "SqlType": "MySql", "UpdateTable": false }, - "KnowsDB": { - "ConnectionString": "Server=47.109.35.116;Database=ResourceBank;UID=live;Password=Woshiren^&*();MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;", - "SqlType": "SqlServer" - } + "OtherDBArr": [ + { + "ConfigId": 1001, //ResourceBank + "ConnectionString": "Server=47.109.35.116;Database=ResourceBank;UID=live;Password=Woshiren^&*();MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;", + "SqlType": "SqlServer" + }, + { + "ConfigId": 1002, //App.public.live + "ConnectionString": "Server=47.109.35.116;Database=App.public.live;UID=live;Password=Woshiren^&*();MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;", + "SqlType": "SqlServer" + } + ] } } diff --git a/VideoAnalysisCore/AICore/GPT/ChatGPT/Chat_GPT.cs b/VideoAnalysisCore/AICore/GPT/ChatGPT/Chat_GPT.cs index 86cd8e6..2325f4e 100644 --- a/VideoAnalysisCore/AICore/GPT/ChatGPT/Chat_GPT.cs +++ b/VideoAnalysisCore/AICore/GPT/ChatGPT/Chat_GPT.cs @@ -10,6 +10,7 @@ using VideoAnalysisCore.AICore.GPT.Dto; using VideoAnalysisCore.AICore.GPT; using System.Threading.Tasks; using VideoAnalysisCore.AICore.SherpaOnnx; +using VideoAnalysisCore.Model.蓝鲸智库; namespace VideoAnalysisCore.AICore.GPT.ChatGPT { diff --git a/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs b/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs index 5f9f3fa..a013a57 100644 --- a/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs +++ b/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs @@ -10,6 +10,7 @@ using VideoAnalysisCore.AICore.GPT.Dto; using System.Threading.Tasks; using VideoAnalysisCore.AICore.GPT.ChatGPT; using VideoAnalysisCore.AICore.SherpaOnnx; +using VideoAnalysisCore.Model.蓝鲸智库; namespace VideoAnalysisCore.AICore.GPT.DeepSeek { @@ -58,7 +59,7 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek string title = taskInfo.MediaName; var fileNameResFormat = "{授课章节: string|null}"; var fileNamePostMessages = title + - " 这是一堂课的标题,请你基于标题帮我分析出这堂课所讲授的内容与最恰当的授课章节(尽可能的关联最贴切的章节并且就保留一个)." + + " 这是一堂课的标题,请你基于标题帮我分析出这堂课所讲授的内容与最恰当的授课章节(关联最贴切的章节,保留一个章节!)." + $"章节范围限定在[{string.Join(',', xkwKnows)}]范围." + $"输出格式 json字符串 对象格式{fileNameResFormat}"; var fileNameInfoRes = await ChatAsync(task, fileNamePostMessages, null);//, "deepseek-chat"); @@ -90,7 +91,8 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek $"从提取出的<知识块>内容称来匹配我提供的知识点,来作为片段的知识点(请确保匹配的知识点是用户提供的,否则片段知识点值为空字符串)。" + $"提供的方法点名称({knows})。 格式 (方法点Id|方法点名称) 如果一个<知识块>出现多个知识点那么知识点Id与知识点名称都用逗号','分割。" + $"这是输入的视频字幕并且是包含时间戳的视频字幕的固定格式文本。" + - $"字幕格式(说话人:开始秒:结束秒:内容|下一段字幕).以下是包含时间的视频字幕文本。字幕列表 {captions.Captions}。" + + //$"字幕格式(说话人:开始秒:结束秒:内容|下一段字幕).以下是包含时间的视频字幕文本。字幕列表 {captions.Captions}。" + + $"字幕格式(开始秒:结束秒:内容|下一段字幕).以下是包含时间的视频字幕文本。字幕列表 {captions.Captions}。" + $"最后请检查某些<知识块>之间的过渡是否自然,如果<知识块>时长超过500秒则考虑拆封为两个更加贴切的<知识块>.或者<知识块>时长小于30秒则考虑合并<知识块>到相邻的<知识块>)。" + $"输出格式({resFormat})"; @@ -111,8 +113,10 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek } var thems = string.Join(',', questionRes.Select(s => s.StartTime + "->" + s.Theme)); - var checkResFormat = """{"Score":打分(number),"Evaluation":评价(string)}"""; - var checkMessage = "我为视频的讲解内容做了一些分段,你能帮我检查下这些分段的时间分配合理吗?请给出你的打分(0-100,70分及格)以及评价" + + var checkResFormat = """{"Score":打分(number),"Evaluation":评价(string),"Data":优化后的分段(array)}"""; + var checkResFormat1 = """[{"Start":开始秒(number),"Theme":优化后的分段主题(string)}]"""; + var checkMessage = "我为视频的讲解内容做了一些分段,你能帮我检查下这些分段的时间分配是否合理,标题内容符合实际吗?" + + $"请给出你的打分(0-100,70分及格)以及打分原因,并且给出优化后的分段 分段格式(${checkResFormat1})" + $"这是我的分段 {thems}." + $"后续的内容是包含时间戳的视频字幕的固定格式文本。" + $"字幕格式(说话人:开始秒:结束秒:内容|下一段字幕).以下是包含时间的视频字幕文本。字幕列表 {captions.Captions}。" + @@ -130,7 +134,7 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek } } - + //todo 未包含的知识点片段 如何处理 var insertData = questionRes .Where(s => !string.IsNullOrEmpty(s.KnowPoint)) .SelectMany( diff --git a/VideoAnalysisCore/AICore/GPT/Dto/QuestionRes.cs b/VideoAnalysisCore/AICore/GPT/Dto/QuestionRes.cs index 0e1992f..88ab059 100644 --- a/VideoAnalysisCore/AICore/GPT/Dto/QuestionRes.cs +++ b/VideoAnalysisCore/AICore/GPT/Dto/QuestionRes.cs @@ -138,6 +138,7 @@ namespace VideoAnalysisCore.AICore.GPT.Dto /// 评分 /// public string Evaluation { get; set; } + public VideoKnowRes[] Data { get; set; } } /// diff --git a/VideoAnalysisCore/Common/AppCommon.cs b/VideoAnalysisCore/Common/AppCommon.cs index 4650deb..46194d9 100644 --- a/VideoAnalysisCore/Common/AppCommon.cs +++ b/VideoAnalysisCore/Common/AppCommon.cs @@ -46,16 +46,11 @@ namespace VideoAnalysisCore.Common .Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.IsDefined(typeof(SugarTable), false))); DbMatserType = assembliesType .Where(u => u.GetInterfaces().Contains(typeof(IDB))); - KnowsType = assembliesType - .Where(u =>u.GetInterfaces().Contains(typeof(IKnowsDB))); } catch { throw; } - //.Where(u => !u.IsDefined(typeof(SplitTableAttribute), false)) - //.Where(u => !typeof(Model.DataCenterYH.IDataCenterYHModel).IsAssignableFrom(u)) - //.Where(u => !u.IsSubclassOf(typeof(YQ_BaseEntity))); } /// @@ -225,11 +220,11 @@ namespace VideoAnalysisCore.Common var stringBuilder = new StringBuilder(); foreach (var item in results) { - stringBuilder.Append(item.Value.First()); + //stringBuilder.Append(item.Value.First()); + //stringBuilder.Append(":"); + stringBuilder.Append((int)item.Key.Start); stringBuilder.Append(":"); - stringBuilder.Append(item.Key.Start); - stringBuilder.Append(":"); - stringBuilder.Append(item.Key.End); + stringBuilder.Append((int)item.Key.End); stringBuilder.Append(":"); stringBuilder.Append(item.Key.Text); stringBuilder.Append("|"); @@ -370,6 +365,10 @@ namespace VideoAnalysisCore.Common /// 启动时更新表结构 /// public bool UpdateTable { get; set; } + /// + /// 配置ID + /// + public long ConfigId { get; set; } } /// @@ -401,14 +400,14 @@ namespace VideoAnalysisCore.Common /// ChatGpt /// public ChatGptConfig ChatGpt { get; set; } = new ChatGptConfig(); + + /// /// 数据库配置 /// public DBConfig DB { get; set; } = new DBConfig(); - /// - /// 知识点数据库 - /// - public DBConfig KnowsDB { get; set; } = new DBConfig(); + + public DBConfig[] OtherDBArr { get; set; } = Array.Empty(); } } diff --git a/VideoAnalysisCore/Common/CoravelExpand.cs b/VideoAnalysisCore/Common/CoravelExpand.cs new file mode 100644 index 0000000..b4a1438 --- /dev/null +++ b/VideoAnalysisCore/Common/CoravelExpand.cs @@ -0,0 +1,31 @@ +using Coravel; +using Coravel.Scheduling.Schedule; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using VideoAnalysisCore.Job; + +namespace VideoAnalysisCore.Common +{ + public static class CoravelExpand + { + public static int MyProperty { get; set; } + public static void Init(IServiceCollection service) + { + + service.AddScheduler(); + service.AddTransient(); + } + public static void Run(IServiceProvider provider) + { + provider.UseScheduler(scheduler => + { + //每5分钟执行一次 未处理视频扫描 + scheduler.Schedule().EveryFiveMinutes(); + }); + } + } +} diff --git a/VideoAnalysisCore/Common/DownloadFile.cs b/VideoAnalysisCore/Common/DownloadFile.cs index cc828a6..a5ceb4b 100644 --- a/VideoAnalysisCore/Common/DownloadFile.cs +++ b/VideoAnalysisCore/Common/DownloadFile.cs @@ -139,12 +139,12 @@ namespace VideoAnalysisCore.Common download.DownloadProgressChanged += (object? sender, Downloader.DownloadProgressChangedEventArgs e) => { pI++; - if(pI%20==0) + if (pI % 20 == 0) RedisExpand.SetTaskProgress(task, e.ProgressPercentage); }; - download.DownloadFileCompleted +=async (object? sender, AsyncCompletedEventArgs e) => + download.DownloadFileCompleted += async (object? sender, AsyncCompletedEventArgs e) => { - if (download.Status == DownloadStatus.Failed && e.Error!=null) + if (download.Status == DownloadStatus.Failed && e.Error != null) { await RedisExpand.SetTaskErrorMessage(long.Parse(task), e.Error) .ConfigureAwait(false);//不切回上下文 diff --git a/VideoAnalysisCore/Common/RedisExpand.cs b/VideoAnalysisCore/Common/RedisExpand.cs index d5acafd..6de3f7a 100644 --- a/VideoAnalysisCore/Common/RedisExpand.cs +++ b/VideoAnalysisCore/Common/RedisExpand.cs @@ -168,6 +168,13 @@ namespace VideoAnalysisCore.Common var taskData = await DbScoped.SugarScope.Queryable() .FirstAsync(s => s.Id == tId); + if (taskData.Captions == "[]") + taskData.Captions = (await Redis.HMGetAsync(RedisExpandKey.Task(task), "Captions")).First(); + if (taskData.Speaker == "[]") + taskData.Speaker = (await Redis.HMGetAsync(RedisExpandKey.Task(task), "Speaker")).First(); + + + taskData.ChatAnalysis =JsonSerializer.Serialize(gptRes); taskData.ChatAnalysisScore = gptRes?.Assessment?.Merit?.Sum(s => s.Score) ?? 0; taskData.ErrorMessage = string.Empty; @@ -176,6 +183,8 @@ namespace VideoAnalysisCore.Common .UpdateColumns(it => new { it.ChatAnalysis, + it.Captions, + it.Speaker, it.ChatAnalysisScore, it.ErrorMessage, it.TotalTokens, diff --git a/VideoAnalysisCore/Common/Repository.cs b/VideoAnalysisCore/Common/Repository.cs index 235516c..b5e5602 100644 --- a/VideoAnalysisCore/Common/Repository.cs +++ b/VideoAnalysisCore/Common/Repository.cs @@ -3,6 +3,7 @@ using SqlSugar.IOC; using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using VideoAnalysisCore.Interface; @@ -12,13 +13,25 @@ namespace VideoAnalysisCore.Common { public class Repository : SimpleClient where T : class, new() { + readonly Dictionary CID= new Dictionary(); public Repository() { - if(typeof(T).GetInterfaces().Contains(typeof(IKnowsDB))) - base.Context = DbScoped.SugarScope.GetConnection(1001); - else - base.Context = DbScoped.SugarScope; + SwitchConnection(); + } + public void SwitchConnection() + { + var t = typeof(T); + if (CID.ContainsKey(t)) + { + base.Context = DbScoped.SugarScope.GetConnectionScope(CID[t]); + return; + } + var c = t.GetCustomAttribute(); + if (!CID.ContainsKey(typeof(T))) + CID.Add(typeof(T), c?.configId); + base.Context = c != null + ? DbScoped.SugarScope.GetConnectionScope(c.configId) + : DbScoped.SugarScope; } - } } diff --git a/VideoAnalysisCore/Common/SqlSugarExpand.cs b/VideoAnalysisCore/Common/SqlSugarExpand.cs index db1d159..a9ebbcf 100644 --- a/VideoAnalysisCore/Common/SqlSugarExpand.cs +++ b/VideoAnalysisCore/Common/SqlSugarExpand.cs @@ -27,15 +27,15 @@ namespace VideoAnalysisCore.Common ConnectionString = AppCommon.Config.DB.ConnectionString, DbType =AppCommon.Config.DB.SqlType, IsAutoCloseConnection = true//自动释放 - }, - new IocConfig() - { - ConfigId =1001, - ConnectionString = AppCommon.Config.KnowsDB.ConnectionString, - DbType =AppCommon.Config.KnowsDB.SqlType, - IsAutoCloseConnection = true//自动释放 }, }; + dbList.AddRange(AppCommon.Config.OtherDBArr.Select(s => new IocConfig() + { + ConfigId=s.ConfigId, + ConnectionString=s.ConnectionString, + DbType=s.SqlType, + IsAutoCloseConnection = true + })); services.AddSingleton(typeof(Repository<>)); //注入SqlSugar 主库 diff --git a/VideoAnalysisCore/Enum/TaskTypeEnum.cs b/VideoAnalysisCore/Enum/TaskTypeEnum.cs index 333b326..69d3389 100644 --- a/VideoAnalysisCore/Enum/TaskTypeEnum.cs +++ b/VideoAnalysisCore/Enum/TaskTypeEnum.cs @@ -10,12 +10,16 @@ namespace VideoAnalysisCore.Enum public enum TaskTypeEnum { /// - /// 蓝鲸智库视频分析 + /// 蓝鲸智库_视频分段 /// - 蓝鲸智库_视频分析, + 蓝鲸智库_视频分段 = 0, + /// + /// 蓝鲸智库_中职视频分段 + /// + 蓝鲸智库_中职视频分段 = 100, /// /// 教研会议_视频分析 /// - 教研会议_视频分析 + 教研会议_视频分析 = 200, } } diff --git a/VideoAnalysisCore/Interface/IKnowsDB.cs b/VideoAnalysisCore/Interface/IKnowsDB.cs deleted file mode 100644 index 4aa5abe..0000000 --- a/VideoAnalysisCore/Interface/IKnowsDB.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace VideoAnalysisCore.Interface -{ - /// - /// 表属于KnowsDB - /// - interface IKnowsDB - { - } -} diff --git a/VideoAnalysisCore/Job/UnprocessedVideoJob.cs b/VideoAnalysisCore/Job/UnprocessedVideoJob.cs new file mode 100644 index 0000000..224835a --- /dev/null +++ b/VideoAnalysisCore/Job/UnprocessedVideoJob.cs @@ -0,0 +1,28 @@ +using Coravel.Invocable; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using VideoAnalysisCore.Common; +using VideoAnalysisCore.Model; + +namespace VideoAnalysisCore.Job +{ + /// + /// 查找未处理的视频 + /// + public class UnprocessedVideoJob : IInvocable + { + private readonly Repository videoTaskDB; + public UnprocessedVideoJob(Repository videoTaskDB) + { + this.videoTaskDB = videoTaskDB; + } + public async Task Invoke() + { + + + } + } +} diff --git a/VideoAnalysisCore/Model/HotwordMode.cs b/VideoAnalysisCore/Model/Dto/HotwordMode.cs similarity index 100% rename from VideoAnalysisCore/Model/HotwordMode.cs rename to VideoAnalysisCore/Model/Dto/HotwordMode.cs diff --git a/VideoAnalysisCore/Model/蓝鲸智库/Attachments.cs b/VideoAnalysisCore/Model/蓝鲸智库/Attachments.cs new file mode 100644 index 0000000..66296fa --- /dev/null +++ b/VideoAnalysisCore/Model/蓝鲸智库/Attachments.cs @@ -0,0 +1,182 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; +using VideoAnalysisCore.Interface; + +namespace App.Model +{ + /// + ///文件附件 + /// + [SugarTable("Attachments")] + [Tenant("1002")] + public partial class Attachments + { + public Attachments() + { + + this.SchoolId = Convert.ToInt64("0"); + this.Sort = Convert.ToInt32("0"); + this.CreateTime = DateTime.Now; + this.DeleteState = false; + + } + /// + /// Desc: + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey = true)] + public long Id { get; set; } + + /// + /// Desc:关联对象类型(枚举) + /// Default: + /// Nullable:False + /// + public int ObjType { get; set; } + + /// + /// Desc:文件名称 + /// Default: + /// Nullable:False + /// + [SugarColumn(Length = 500)] + public string Name { get; set; } + + /// + /// Desc:自定义名称 + /// Default: + /// Nullable:True + /// + [SugarColumn(IsNullable = true, Length = 200)] + public string CustomName { get; set; } + + /// + /// Desc:文件类型 + /// Default: + /// Nullable:False + /// + [SugarColumn(Length = 100)] + public string Type { get; set; } + + /// + /// Desc:链接 + /// Default: + /// Nullable:False + /// + [SugarColumn(Length = 255)] + public string Url { get; set; } + + /// + /// Desc:扩展名 + /// Default: + /// Nullable:False + /// + [SugarColumn(Length = 20)] + public string Extension { get; set; } + + /// + /// Desc:文件大小(KB) + /// Default: + /// Nullable:False + /// + [SugarColumn(Length = 11, DecimalDigits = 2)] + public decimal Size { get; set; } + + /// + /// Desc:学校 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(IsNullable = true)] + public long? SchoolId { get; set; } + + /// + /// Desc:时长 + /// Default: + /// Nullable:True + /// + [SugarColumn(IsNullable = true, Length = 10, DecimalDigits = 2)] + public decimal? Duration { get; set; } + + /// + /// Desc:排序 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(IsNullable = true)] + public int? Sort { get; set; } + + /// + /// Desc:视频码 + /// Default: + /// Nullable:True + /// + [SugarColumn(IsNullable = true)] + public string VideoCode { get; set; } + + /// + /// Desc:年级 + /// Default: + /// Nullable:True + /// + [SugarColumn(IsNullable = true)] + public string GradeName { get; set; } + + /// + /// Desc:科目 + /// Default: + /// Nullable:True + /// + [SugarColumn(IsNullable = true)] + public string SubjectName { get; set; } + + /// + /// Desc:班级 + /// Default: + /// Nullable:True + /// + [SugarColumn(IsNullable = true)] + public string ClassName { get; set; } + + /// + /// Desc:创建时间 + /// Default:DateTime.Now + /// Nullable:False + /// + public DateTime CreateTime { get; set; } + + /// + /// Desc: + /// Default:0 + /// Nullable:False + /// + public bool DeleteState { get; set; } + /// + /// 转换后的图片数量 + /// + [SugarColumn(IsNullable = true)] + public int ConvertPageCount { get; set; } + + /// + /// 文件所属类型 + /// + [SugarColumn(IsNullable = true, DefaultValue = "0")] + public int DataType { get; set; } + + [SugarColumn(IsIgnore = true)] + public string DataTypeName { get; set; } + + [SugarColumn(ColumnDescription = "新增用户id", IsNullable = true)] + public long AdminId { get; set; } + + [SugarColumn(ColumnDescription = "新增用户角色id", IsNullable = true)] + public long AdminRoleId { get; set; } + + + } + + +} diff --git a/VideoAnalysisCore/Model/蓝鲸智库/FileContent.cs b/VideoAnalysisCore/Model/蓝鲸智库/FileContent.cs new file mode 100644 index 0000000..eb3738a --- /dev/null +++ b/VideoAnalysisCore/Model/蓝鲸智库/FileContent.cs @@ -0,0 +1,128 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; +using VideoAnalysisCore.Interface; + +namespace App.Model +{ + /// + /// 文件内容表 + /// + [SugarTable("FileContent")] + [Tenant("1002")] + public partial class FileContent + { + public FileContent(){ + + this.Sort =Convert.ToInt32("0"); + this.CreateTime =DateTime.Now; + this.DeleteState =false; + + } + + [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] + public long Id {get;set;} + + /// + /// Desc:内容名称 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "内容名称", ColumnDataType = "nvarchar(500)", IsNullable = false)] + public string FileName {get;set;} + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "学校id", IsNullable = true)] + public long? SchoolId {get;set;} + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "学校名称", ColumnDataType = "nvarchar(100)", IsNullable = true)] + public string SchoolName {get;set;} + + /// + /// Desc:年级 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "年级", ColumnDataType = "nvarchar(30)", IsNullable = true)] + public string GradeName {get;set;} + + /// + /// Desc:科目 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "科目", IsNullable = true)] + + public int? SubjectId {get;set;} + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "科目名称", ColumnDataType = "nvarchar(50)", IsNullable = true)] + public string SubjectName {get;set;} + + /// + /// Desc:文件系统目录id + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "件系统目录id", IsNullable = false)] + public long FileDirectoryId {get;set;} + + /// + /// Desc: + /// Default:0 + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "排序", IsNullable = false, DefaultValue = "0")] + public int Sort {get;set;} + + + public DateTime CreateTime {get;set;} + + public bool DeleteState {get;set;} + + /// + /// Desc:文件包Id + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "文件包id", IsNullable = false)] + public long BagId {get;set;} + + /// + /// Desc:作者 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "作者", ColumnDataType = "nvarchar(200)", IsNullable = true)] + public string Author {get;set;} + + /// + /// 是否可以下载 + /// + public bool DownState { get; set; } + /// + /// 管理员id + /// + [SugarColumn(ColumnDescription = "管理员id", IsNullable = true)] + public long? AdminId { get; set; } + /// + /// 管理员角色id + /// + [SugarColumn(ColumnDescription = "管理员角色id", IsNullable = true)] + public long? AdminRoleId { get; set; } + } +} diff --git a/VideoAnalysisCore/Model/蓝鲸智库/FileContentMaterial.cs b/VideoAnalysisCore/Model/蓝鲸智库/FileContentMaterial.cs new file mode 100644 index 0000000..a79eb62 --- /dev/null +++ b/VideoAnalysisCore/Model/蓝鲸智库/FileContentMaterial.cs @@ -0,0 +1,66 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; +using VideoAnalysisCore.Interface; + +namespace App.Model +{ + /// + /// + /// + [SugarTable("FileContentMaterial")] + [Tenant("1002")] + public partial class FileContentMaterial + { + public FileContentMaterial(){ + + this.CreateTime =DateTime.Now; + this.DeleteState =false; + + } + /// + /// Desc:文件系统内容 + /// Default: + /// Nullable:False + /// + [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] + public long Id {get;set;} + + /// + /// Desc:文件系统内容 + /// Default: + /// Nullable:False + /// + public long FileContentId {get;set;} + + /// + /// Desc:素材id + /// Default: + /// Nullable:False + /// + public long MaterialId {get;set;} + + /// + /// Desc: + /// Default:DateTime.Now + /// Nullable:False + /// + public DateTime CreateTime {get;set;} + + /// + /// Desc: + /// Default:0 + /// Nullable:False + /// + public bool DeleteState {get;set;} + + public int Sort { get; set; } + + /// + /// 是否可以下载 + /// + public bool DownState { get; set; } = false; + + } +} diff --git a/VideoAnalysisCore/Model/蓝鲸智库/FileDirectory.cs b/VideoAnalysisCore/Model/蓝鲸智库/FileDirectory.cs new file mode 100644 index 0000000..e0e3173 --- /dev/null +++ b/VideoAnalysisCore/Model/蓝鲸智库/FileDirectory.cs @@ -0,0 +1,161 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; +using VideoAnalysisCore.Interface; + +namespace App.Model +{ + /// + /// 文件目录表 + /// + [SugarTable("FileDirectory")] + [Tenant("1002")] + public partial class FileDirectory + { + public FileDirectory(){ + + this.State =Convert.ToInt32("1"); + this.IsCheckedSelect =true; + this.IsLastNode =false; + this.ParentId =Convert.ToInt64("0"); + this.CreateTime =DateTime.Now; + this.DeleteState =false; + this.AliasName =Convert.ToString(""); + this.IsPublic =false; + this.Types =Convert.ToInt32("-1"); + this.Code =Convert.ToString(""); + + } + [SugarColumn(IsPrimaryKey=true,IsIdentity=true)] + public long Id {get;set;} + + /// + /// Desc:名称 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "名称", ColumnDataType = "nvarchar(50)", IsNullable = false)] + public string Name {get;set;} + + /// + /// Desc:排序 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "排序", IsNullable = false)] + public int Sort {get;set;} + + /// + /// Desc:结构状态 1=显示 + /// Default:1 + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "结构状态 1=显示", IsNullable = false,DefaultValue ="1")] + public int State {get;set;} + + /// + /// Desc:是否自动授权 + /// Default:1 + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "是否自动授权", IsNullable = false, DefaultValue = "1")] + public bool IsCheckedSelect {get;set;} + + /// + /// Desc:是否最后一级节点 + /// Default:0 + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "是否最后一级节点", IsNullable = false, DefaultValue = "0")] + public bool IsLastNode {get;set;} + + /// + /// Desc:上级id + /// Default:0 + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "上级id", IsNullable = false, DefaultValue = "0")] + public long ParentId {get;set;} + + + public DateTime CreateTime {get;set;} + + public bool DeleteState {get;set;} + + /// + /// Desc:别名 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "别名", ColumnDataType = "nvarchar(50)", IsNullable = false)] + public string AliasName {get;set;} + + /// + /// Desc:是否公开 + /// Default:0 + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "是否公开", IsNullable = true, DefaultValue = "0")] + public bool? IsPublic {get;set;} + + /// + /// Desc:其他=-1,目录=0,课程=1,章=2,节=3 + /// Default:-1 + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "其他=-1,目录=0,课程=1,章=2,节=3", IsNullable = true, DefaultValue = "-1")] + public int? Types {get;set;} + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)] + public DateTime? UpdateTime {get;set;} + + /// + /// Desc:课程id(来源courseinfo) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "课程id(来源courseinfo)", IsNullable = true)] + public long? CourseId {get;set;} + + /// + /// Desc:教材版本id(来源 textboox_versions) + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "教材版本id(来源 textboox_versions)", IsNullable = true)] + public long? VersionsId {get;set;} + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "", ColumnDataType = "nvarchar(50)", IsNullable = true)] + public string Code {get;set;} + + /// + /// Desc:根节点id + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "根节点id", IsNullable = true)] + public long? RootId {get;set;} + /// + /// 管理员id + /// + [SugarColumn(ColumnDescription = "管理员id", IsNullable = true)] + public long? AdminId { get; set; } + /// + /// 管理员角色id + /// + [SugarColumn(ColumnDescription = "管理员角色id", IsNullable = true)] + public long? AdminRoleId { get; set; } + + } +} diff --git a/VideoAnalysisCore/Model/KnowledgeInfo.cs b/VideoAnalysisCore/Model/蓝鲸智库/KnowledgeInfo.cs similarity index 93% rename from VideoAnalysisCore/Model/KnowledgeInfo.cs rename to VideoAnalysisCore/Model/蓝鲸智库/KnowledgeInfo.cs index 39905bb..6825515 100644 --- a/VideoAnalysisCore/Model/KnowledgeInfo.cs +++ b/VideoAnalysisCore/Model/蓝鲸智库/KnowledgeInfo.cs @@ -6,10 +6,14 @@ using System.Text; using System.Threading.Tasks; using VideoAnalysisCore.Interface; -namespace VideoAnalysisCore.Model +namespace VideoAnalysisCore.Model.蓝鲸智库 { + /// + /// 蓝鲸智库 知识点表 + /// [SugarTable("knowledgeinfo")] - public class KnowledgeInfo : IKnowsDB + [Tenant("1001")] + public class KnowledgeInfo { [SugarColumn(IsPrimaryKey = true, ColumnDescription = "Id 主键", ColumnName = "id")] public long Id { get; set; } diff --git a/VideoAnalysisCore/Model/蓝鲸智库/Material.cs b/VideoAnalysisCore/Model/蓝鲸智库/Material.cs new file mode 100644 index 0000000..49cd3e8 --- /dev/null +++ b/VideoAnalysisCore/Model/蓝鲸智库/Material.cs @@ -0,0 +1,110 @@ +using System; +using System.Linq; +using System.Text; +using SqlSugar; +using VideoAnalysisCore.Interface; + +namespace App.Model +{ + /// + ///素材表 + /// + [SugarTable("Material")] + [Tenant("1002")] + public partial class Material + { + public Material() + { + + this.TagId = Convert.ToInt64("0"); + this.CreateTime = DateTime.Now; + this.DeleteState = false; + this.DownState = false; + } + + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public long Id { get; set; } + + /// + /// Desc:素材编号 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "素材编号", ColumnDataType = "nvarchar(50)", IsNullable = false)] + public string MaterialNo { get; set; } + + /// + /// Desc:素材类型(1:视频;2: 文件;3:音频;4:图片;) + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "素材类型(1:视频;2: 文件;3:音频;4:图片;)", IsNullable = false)] + public int MaterialType { get; set; } + + /// + /// Desc:标签Id + /// Default:0 + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "素标签Id", IsNullable = false,DefaultValue ="0")] + public long TagId { get; set; } + + /// + /// Desc:素材名称 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "素材名称", ColumnDataType = "nvarchar(500)", IsNullable = false)] + public string MaterialName { get; set; } + + /// + /// Desc:附件id + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "附件id",IsNullable = false)] + public long AttachmentsId { get; set; } + + /// + /// Desc: + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnDescription = "内容", ColumnDataType = "nvarchar(max)", IsNullable = true)] + public string Desc { get; set; } + + public DateTime CreateTime { get; set; } + + public bool DeleteState { get; set; } + + /// + /// 新增用户id + /// + [SugarColumn(ColumnDescription = "新增用户id")] + public long CreateUserId { get; set; } + + /// + /// Desc:新增用户名称 + /// Default: + /// Nullable:False + /// + [SugarColumn(ColumnDescription = "新增用户名称",ColumnDataType = "nvarchar(50)")] + public string CreateUserName { get; set; } + + [SugarColumn(ColumnDescription = "学校id",IsNullable =true)] + public long SchoolId { get; set; } + + [SugarColumn(ColumnDescription = "学校名称", ColumnDataType = "nvarchar(50)", IsNullable = true)] + public string SchoolName { get; set; } + /// + /// 是否可以下载 + /// + [SugarColumn(ColumnDescription = "是否可以下载", DefaultValue ="0")] + public bool DownState { get; set; } + /// + /// 新增用户角色id + /// + [SugarColumn(ColumnDescription = "新增用户角色id",IsNullable =true)] + public long AdminRoleId { get; set; } + } +} diff --git a/VideoAnalysisCore/VideoAnalysisCore.csproj b/VideoAnalysisCore/VideoAnalysisCore.csproj index 7722e4f..ee585c8 100644 --- a/VideoAnalysisCore/VideoAnalysisCore.csproj +++ b/VideoAnalysisCore/VideoAnalysisCore.csproj @@ -57,6 +57,7 @@ +