diff --git a/Learn.VideoAnalysis.API/appsettings.Production.json b/Learn.VideoAnalysis.API/appsettings.Production.json index 3e96819..1f6695f 100644 --- a/Learn.VideoAnalysis.API/appsettings.Production.json +++ b/Learn.VideoAnalysis.API/appsettings.Production.json @@ -27,6 +27,18 @@ "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None", "SqlType": "MySql", "UpdateTable": false - } + }, + "OtherDBArr": [ + { // 线上正式环境库 + "ConfigId": 1001, //ResourceBank + "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=resourcebank;CharSet=utf8mb4;pooling=true;SslMode=None", + "SqlType": "MySql" + }, + { + "ConfigId": 1002, //App.public.live + "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=app.public.live;CharSet=utf8mb4;pooling=true;SslMode=None", + "SqlType": "MySql" + } + ] } } diff --git a/Learn.VideoAnalysis.API/appsettings.json b/Learn.VideoAnalysis.API/appsettings.json index c35ce20..5ef3ad7 100644 --- a/Learn.VideoAnalysis.API/appsettings.json +++ b/Learn.VideoAnalysis.API/appsettings.json @@ -74,15 +74,15 @@ "EndPoint": "oss-cn-chengdu.aliyuncs.com" //上传节点 }, "OtherDBArr": [ - { + {// 线上正式环境库 "ConfigId": 1001, //ResourceBank - "ConnectionString": "Server=47.109.35.116;Database=ResourceBank;UID=live;Password=Woshiren^&*();MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;", - "SqlType": "SqlServer" + "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=resourcebank;CharSet=utf8mb4;pooling=true;SslMode=None", + "SqlType": "MySql" }, { "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" + "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=app.public.live;CharSet=utf8mb4;pooling=true;SslMode=None", + "SqlType": "MySql" } ] } diff --git a/VideoAnalysis/appsettings.json b/VideoAnalysis/appsettings.json index 8e29b8d..dacf58f 100644 --- a/VideoAnalysis/appsettings.json +++ b/VideoAnalysis/appsettings.json @@ -76,15 +76,15 @@ "EndPoint": "oss-cn-chengdu.aliyuncs.com" //上传节点 }, "OtherDBArr": [ - { + { // 线上正式环境库 "ConfigId": 1001, //ResourceBank - "ConnectionString": "Server=47.109.35.116;Database=ResourceBank;UID=live;Password=Woshiren^&*();MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;", - "SqlType": "SqlServer" + "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=resourcebank;CharSet=utf8mb4;pooling=true;SslMode=None", + "SqlType": "MySql" }, { "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" + "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=app.public.live;CharSet=utf8mb4;pooling=true;SslMode=None", + "SqlType": "MySql" } ] } diff --git a/VideoAnalysisCore/Controllers/ApiController.cs b/VideoAnalysisCore/Controllers/ApiController.cs index bb727fe..2c0ea4c 100644 --- a/VideoAnalysisCore/Controllers/ApiController.cs +++ b/VideoAnalysisCore/Controllers/ApiController.cs @@ -18,6 +18,7 @@ using VideoAnalysisCore.Controllers.Dto; using VideoAnalysisCore.Common.Expand; using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; +using VideoAnalysisCore.Model.ǿ; namespace VideoAnalysisCore.Controllers { @@ -28,12 +29,14 @@ namespace VideoAnalysisCore.Controllers private readonly IMapper mp; private readonly Repository videoTaskDB; private readonly Repository videoKonwDB; + private readonly Repository courseInfoDB; public ApiController(Repository videoTaskDB, - IMapper mp, Repository videoKonwDB) + IMapper mp, Repository videoKonwDB, Repository courseInfoDB) { this.videoTaskDB = videoTaskDB; this.mp = mp; this.videoKonwDB = videoKonwDB; + this.courseInfoDB = courseInfoDB; } private string GetClientIpAddress() @@ -78,13 +81,8 @@ namespace VideoAnalysisCore.Controllers [HttpGet(Name = "tets1")] public IActionResult tets1(string task) { - - using var scope = AppCommon.Services?.CreateScope(); - if (scope is null || scope.ServiceProvider.GetService() is null) - throw new Exception("IBserGPT δע"); - else - scope.ServiceProvider.GetService()?.GetVideoType(task); - return Ok(); + var courseArr = courseInfoDB.AsQueryable().ToArray(); + return Ok(courseArr); } /// /// ʶ