优化 蓝鲸字库数据库切换为rds
This commit is contained in:
parent
eca3e9278e
commit
2ddbe98a1b
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<VideoTask> videoTaskDB;
|
||||
private readonly Repository<VideoKonwPoint> videoKonwDB;
|
||||
private readonly Repository<CourseInfo> courseInfoDB;
|
||||
public ApiController(Repository<VideoTask> videoTaskDB,
|
||||
IMapper mp, Repository<VideoKonwPoint> videoKonwDB)
|
||||
IMapper mp, Repository<VideoKonwPoint> videoKonwDB, Repository<CourseInfo> 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<IBserGPT>() is null)
|
||||
throw new Exception("IBserGPT δעÈë");
|
||||
else
|
||||
scope.ServiceProvider.GetService<IBserGPT>()?.GetVideoType(task);
|
||||
return Ok();
|
||||
var courseArr = courseInfoDB.AsQueryable().ToArray();
|
||||
return Ok(courseArr);
|
||||
}
|
||||
/// <summary>
|
||||
/// ÓïÒôʶ±ð
|
||||
|
|
|
|||
Loading…
Reference in New Issue